Used to re-organized folders
This commit is contained in:
		| @ -8,6 +8,8 @@ public class RenameConfiguration | ||||
| { | ||||
|  | ||||
|     public string[]? IgnoreExtensions { get; set; } | ||||
|     public bool? MoveFilesToRoot { get; set; } | ||||
|     public bool? SkipIdFiles { get; set; } | ||||
|     public string[]? ValidImageFormatExtensions { get; set; } | ||||
|  | ||||
|     public override string ToString() | ||||
| @ -30,6 +32,7 @@ public class RenameConfiguration | ||||
|                     continue; | ||||
|                 throw new NotSupportedException(physicalFileProvider.Root); | ||||
|             } | ||||
|             throw new NotSupportedException("Not Found!"); | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -44,10 +47,14 @@ public class RenameConfiguration | ||||
|         Models.RenameConfiguration result; | ||||
|         if (configuration is null) throw new NullReferenceException(nameof(configuration)); | ||||
|         if (configuration.IgnoreExtensions is null) throw new NullReferenceException(nameof(configuration.IgnoreExtensions)); | ||||
|         if (configuration.MoveFilesToRoot is null) throw new NullReferenceException(nameof(configuration.MoveFilesToRoot)); | ||||
|         if (configuration.SkipIdFiles is null) throw new NullReferenceException(nameof(configuration.SkipIdFiles)); | ||||
|         if (configuration.ValidImageFormatExtensions is null) throw new NullReferenceException(nameof(configuration.ValidImageFormatExtensions)); | ||||
|         Verify(configuration); | ||||
|         result = new(metadataConfiguration, | ||||
|                      configuration.IgnoreExtensions, | ||||
|                      configuration.MoveFilesToRoot.Value, | ||||
|                      configuration.SkipIdFiles.Value, | ||||
|                      configuration.ValidImageFormatExtensions); | ||||
|         return result; | ||||
|     } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user