Метод | Описание | |
---|---|---|
CopyDirectory ( string sourcePath, string targetPath, bool overwrite = false, Predicate |
Deep-Copies the source directory to the target path.
|
|
FilesEqual ( string filePathA, string filePathB ) : bool |
Determines whether the contents of two files are completely equal.
|
|
GetFileHash ( string filePath ) : int |
Calculates a hash value from the full (byte by byte) content of a file.
|
|
GetFreePath ( string pathBase, string pathExt ) : string |
Returns a path that isn't taken yet.
|
|
GetMutualDirectory ( string path, string path2 ) : string |
Returns a mutual base path of two different paths.
|
|
GetValidFileName ( string fileName ) : string |
Takes a string that is supposed to be a file name and converts it into an actually valid file name, replacing invalid characters by undercores.
|
|
IsPathLocatedIn ( string path, string baseDir ) : bool |
Returns whether one path is a sub-path of another.
|
|
IsPathVisible ( string path ) : bool |
Returns whether the specified file or directory is visible, i.e. not hidden.
|
|
MakeFilePathRelative ( string filePath, string relativeToDir = "." ) : string |
Returns the relative path from one path to another.
|
Метод | Описание | |
---|---|---|
IsPathValid ( string path ) : bool |
public static CopyDirectory ( string sourcePath, string targetPath, bool overwrite = false, Predicate |
||
sourcePath | string | |
targetPath | string | |
overwrite | bool | |
filter | Predicate |
|
Результат | bool |
public static FilesEqual ( string filePathA, string filePathB ) : bool | ||
filePathA | string | |
filePathB | string | |
Результат | bool |
public static GetFileHash ( string filePath ) : int | ||
filePath | string | |
Результат | int |
public static GetFreePath ( string pathBase, string pathExt ) : string | ||
pathBase | string | The path to use as base for finding a available path. |
pathExt | string | The (file) extension to add to the new path. |
Результат | string |
public static GetMutualDirectory ( string path, string path2 ) : string | ||
path | string | The first path. |
path2 | string | The second path. |
Результат | string |
public static GetValidFileName ( string fileName ) : string | ||
fileName | string | A string that is supposed to be a file name. |
Результат | string |
public static IsPathLocatedIn ( string path, string baseDir ) : bool | ||
path | string | The supposed sub-path. |
baseDir | string | The (directory) path in which the supposed sub-path might be located in. |
Результат | bool |
public static IsPathVisible ( string path ) : bool | ||
path | string | |
Результат | bool |
public static MakeFilePathRelative ( string filePath, string relativeToDir = "." ) : string | ||
filePath | string | The path to make relative. |
relativeToDir | string | The path to make it relative to. |
Результат | string |