Method | Description | |
---|---|---|
AreSame ( this a, |
||
AreSame ( this a, |
||
AttemptOpen ( this file, FileAccess fileAccess = FileAccess.ReadWrite, FileShare fileShare = FileShare.None ) : Attempt |
Attempts to open a file. Immediately closes the file if successful. Swallows (but returns) any exception encountered while trying to open the file.
|
|
ComputeFileHash ( this fileInfo, |
||
ComputeHash ( this stream, |
||
Contains ( this dir, |
Determines if the directory contains the other directory or file at any depth.
|
|
ContainsDirectly ( this dir, |
Determines if the directory directly contains the other directory or file.
|
|
ConvertToString ( this bytes ) : string | ||
CreateFileSystemInfoFromPath ( this path ) : |
||
EnsureExists ( this dir ) : |
||
EnumerateBytes ( this file ) : IEnumerable |
||
EnumeratePathDownFromRoot ( this source ) : IEnumerable |
Yields each part of the path, ordered from the root to the item.
|
|
EnumeratePathUpToRoot ( this source ) : IEnumerable |
Yields each part of the path, ordered from the item to the root.
|
|
GetFile ( this directory, string file ) : |
||
GetParentDirectory ( this fileSystemInfo ) : |
||
GetPath ( this specialFolder, Environment option = Environment.SpecialFolderOption.None ) : string | ||
GetRelativePathFrom ( this to, |
||
GetRelativePathTo ( this from, |
||
GetSubDirectory ( this directory ) : |
||
GetUnchangedFiles ( this |
Returns files that haven't changed over a period of time.
|
|
IsContainedDirectlyWithin ( this fileOrDirectory, |
Determines if the file or directory is contained directly within the the other directory.
|
|
IsContainedWithin ( this fileOrDirectory, |
Determines if the file or directory is contained within the the other directory at any depth.
|
|
IsDirectoryPath ( this path ) : bool | ||
IsFilePath ( this path ) : bool | ||
PollForAllFiles ( this di, System.TimeSpan interval, |
Checks and rechecks a directory and all sub-directories for files. Only returns files that haven't changed between checks.
|
|
PollForFiles ( this di, System.TimeSpan interval, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly, |
Checks and rechecks a directory for files. Only returns files that haven't changed between checks.
|
|
WhereCanOpen ( this |
public static AreSame ( this a, |
||
a | this | |
b | ||
return | bool |
public static AreSame ( this a, |
||
a | this | |
b | ||
return | bool |
public static AttemptOpen ( this file, FileAccess fileAccess = FileAccess.ReadWrite, FileShare fileShare = FileShare.None ) : Attempt | ||
file | this | The file to attempt to open. |
fileAccess | FileAccess | The access required to open the file. Defaults to ReadWrite. |
fileShare | FileShare | The access granted to others trying to manipulate the file. Defaults to none. |
return | Attempt |
public static ComputeFileHash ( this fileInfo, |
||
fileInfo | this | |
algorithm | ||
return | string |
public static ComputeHash ( this stream, |
||
stream | this | |
algorithm | ||
return | byte[] |
public static Contains ( this dir, |
||
dir | this | |
other | ||
return | bool |
public static ContainsDirectly ( this dir, |
||
dir | this | |
other | ||
return | bool |
public static ConvertToString ( this bytes ) : string | ||
bytes | this | |
return | string |
public static CreateFileSystemInfoFromPath ( this path ) : |
||
path | this | |
return |
public static EnsureExists ( this dir ) : |
||
dir | this | |
return |
public static EnumerateBytes ( this file ) : IEnumerable |
||
file | this | |
return | IEnumerable |
public static EnumeratePathDownFromRoot ( this source ) : IEnumerable |
||
source | this | |
return | IEnumerable |
public static EnumeratePathUpToRoot ( this source ) : IEnumerable |
||
source | this | |
return | IEnumerable |
public static GetFile ( this directory, string file ) : |
||
directory | this | |
file | string | |
return |
public static GetParentDirectory ( this fileSystemInfo ) : |
||
fileSystemInfo | this | |
return |
public static GetPath ( this specialFolder, Environment option = Environment.SpecialFolderOption.None ) : string | ||
specialFolder | this | |
option | Environment | |
return | string |
public static GetRelativePathFrom ( this to, |
||
to | this | |
from | ||
return | string |
public static GetRelativePathTo ( this from, |
||
from | this | |
to | ||
return | string |
public static GetSubDirectory ( this directory ) : |
||
directory | this | |
return |
public static GetUnchangedFiles ( this |
||
source | this |
Files to check. |
interval | System.TimeSpan | Time to wait between checking the files. |
cancellationToken | Token to cancel the wait between checks. | |
return | System.IO.FileInfo[] |
public static IsContainedDirectlyWithin ( this fileOrDirectory, |
||
fileOrDirectory | this | |
otherDir | ||
return | bool |
public static IsContainedWithin ( this fileOrDirectory, |
||
fileOrDirectory | this | |
otherDir | ||
return | bool |
public static IsDirectoryPath ( this path ) : bool | ||
path | this | |
return | bool |
public static IsFilePath ( this path ) : bool | ||
path | this | |
return | bool |
public static PollForAllFiles ( this di, System.TimeSpan interval, |
||
di | this | The directory to check. |
interval | System.TimeSpan | The time between checking for files. |
cancellationToken | Token to cancel the wait between checks. | |
return | System.IO.FileInfo[] |
public static PollForFiles ( this di, System.TimeSpan interval, string searchPattern = "*", SearchOption searchOption = SearchOption.TopDirectoryOnly, |
||
di | this | The directory to check. |
interval | System.TimeSpan | The time between checking for files. |
searchPattern | string | The search pattern. |
searchOption | SearchOption | The search options. |
cancellationToken | Token to cancel the wait between checks. | |
return | System.IO.FileInfo[] |
public static WhereCanOpen ( this |
||
files | this |
|
return | IEnumerable |