IFileOperatorExtensions
public static class IFileOperatorExtensions
1. Methods
1.1. DiffByHash(IFileOperator, IFileProvider, string, string, string[])
public static IEnumerable<IFileInfo> DiffByHash(this IFileOperator target, IFileProvider source, string directory = "", string directory2 = "", params string[] excludePatterns)
| Name | Type | Description |
|---|---|---|
target |
IFileOperator |
|
source |
IFileProvider |
|
directory |
string |
|
directory2 |
string |
|
excludePatterns |
string[] |
Returns: IEnumerable<IFileInfo>
1.2. EnsureDeleteAllFromRoot(IFileOperator)
public static void EnsureDeleteAllFromRoot(this IFileOperator target)
| Name | Type | Description |
|---|---|---|
target |
IFileOperator |
1.3. EnsureDirectory(string)
public static void EnsureDirectory(string path)
| Name | Type | Description |
|---|---|---|
path |
string |
1.4. EnsureNoDiff(IFileOperator, IFileProvider, ISystemHost, string, string, string[])
public static void EnsureNoDiff(this IFileOperator target, IFileProvider source, ISystemHost host, string sourceDir = "", string targetDir = "", params string[] excludePatterns)
| Name | Type | Description |
|---|---|---|
target |
IFileOperator |
|
source |
IFileProvider |
|
host |
ISystemHost |
|
sourceDir |
string |
|
targetDir |
string |
|
excludePatterns |
string[] |
1.5. EnsureNoDiff(IFileOperator, ISystemHost, string, string, string[])
public static void EnsureNoDiff(this IFileOperator sourceAndTarget, ISystemHost host, string sourceDir = "", string targetDir = "", params string[] excludePatterns)
| Name | Type | Description |
|---|---|---|
sourceAndTarget |
IFileOperator |
|
host |
ISystemHost |
|
sourceDir |
string |
|
targetDir |
string |
|
excludePatterns |
string[] |
1.6. EnsureNoDiffFile(IFileOperator, IFileProvider, IFileInfo, ISystemHost, string, string[])
public static void EnsureNoDiffFile(this IFileOperator target, IFileProvider source, IFileInfo sourceFile, ISystemHost host, string targetDir = "", params string[] excludePatterns)
| Name | Type | Description |
|---|---|---|
target |
IFileOperator |
|
source |
IFileProvider |
|
sourceFile |
IFileInfo |
|
host |
ISystemHost |
|
targetDir |
string |
|
excludePatterns |
string[] |
1.7. GetFileProvider(AbsolutePath)
public static IFileProvider GetFileProvider(this AbsolutePath root)
| Name | Type | Description |
|---|---|---|
root |
AbsolutePath |
Returns: IFileProvider
1.8. KeyNameSelector(IFileInfo)
public static string KeyNameSelector(IFileInfo info)
| Name | Type | Description |
|---|---|---|
info |
IFileInfo |
Returns: string
1.9. Key_SHA2_256_HashSelector(FileInfoEntry)
public static string Key_SHA2_256_HashSelector(FileInfoEntry info)
| Name | Type | Description |
|---|---|---|
info |
FileInfoEntry |
Returns: string
1.10. Key_SHA2_256_HashSelector(IFileInfo)
public static string Key_SHA2_256_HashSelector(IFileInfo info)
| Name | Type | Description |
|---|---|---|
info |
IFileInfo |
Returns: string
1.11. Key_XXH3_128_HashSelector(FileInfoEntry)
public static string Key_XXH3_128_HashSelector(FileInfoEntry info)
| Name | Type | Description |
|---|---|---|
info |
FileInfoEntry |
Returns: string
1.12. Key_XXH3_128_HashSelector(IFileInfo)
public static string Key_XXH3_128_HashSelector(IFileInfo info)
| Name | Type | Description |
|---|---|---|
info |
IFileInfo |
Returns: string
1.13. Write(IFileOperator, SubPath, byte[])
public static void Write(this IFileOperator fileOperator, SubPath file, byte[] content)
| Name | Type | Description |
|---|---|---|
fileOperator |
IFileOperator |
|
file |
SubPath |
|
content |
byte[] |
1.14. Write(IFileOperator, SubPath, string)
public static void Write(this IFileOperator fileOperator, SubPath file, string content)
| Name | Type | Description |
|---|---|---|
fileOperator |
IFileOperator |
|
file |
SubPath |
|
content |
string |