Property | Type | Description | |
---|---|---|---|
OriginalTempFolder | string |
Method | Description | |
---|---|---|
CanonicalizePath ( this path, bool IsPotentiallyRelativePath = true ) : string |
This takes a string that is representative of a filename and tries to create a path that can be considered the 'canonical' path. path on drives that are mapped as remote shares are rewritten as their \\server\share\path
|
|
CanonicalizePathIfLocalAndExists ( this filename ) : string | ||
CanonicalizePathWithWildcards ( this path ) : string |
cleans up a path if it is a filesystem path, uri or wildcard. returns the original unmodified path if it is not.
|
|
ChangeFileExtensionTo ( this currentFilename, string newExtension ) : string |
Changes the file extension to another extension.
|
|
CreateWritableWorkingCopy ( this filename ) : string |
This makes a temporary copy of a file that we can work with.
|
|
DirectoryEnumerateFilesSmarter ( this path, SearchOption searchOption ) : IEnumerable |
||
DirectoryEnumerateFilesSmarter ( this path, string searchPattern, SearchOption searchOption ) : IEnumerable |
Enumerates files in a directory, smarter than Direcotry.EnumerateFiles (ie, doesn't throw, when it can't access something)
|
|
DirectoryExistsAndIsAccessible ( this path ) : bool |
Directories the exists and is accessible.
|
|
EnsureFileIsLocal ( this filename, string localFolder = null ) : string | ||
FileIsLocalAndExists ( this filename ) : bool | ||
FindFilesSmarter ( this pathMask, string subpathMask = null ) : IEnumerable |
A front end to DirectoryEnumerateFilesSmarter that allows for wildcards in the path or serarch mask (and expands it out to a full path first.) it also constrains the path as much as possible to keep from enumerating directories that will never match files.
|
|
FindFilesSmarter ( this |
finds matches for a collection of filenames using FindFilesSmarter (above)
|
|
FindFilesSmarterComplex ( this pathMask, string pathPrefix = null ) : IEnumerable |
always call IsWildcardMatch with a prefix!!!!
|
|
FindFilesSmarterComplex ( this |
||
FixFilepathSlashes ( this filepath ) : string |
Replaces Unix style file path separators (/) with Windows style (\).
|
|
FormatFilename ( this filename ) : string |
Generates a filename on a somewhat different template. {date} - the current date (y-m-d) {date-long} - the date in long format {time} - the current time (Hh:mm:ss) {time-long} - the current time in long fmt {ticks} - the current timestamp as tics {counter} - a running counter |
|
GenerateTemplatedFilename ( this filename, string filenameHint ) : string |
Generates a filename based of a template that can contain many different values {filename} - substitutes for the original filename, no extension {ext} original extension {folder} - original folder {subfolder} - original folder without leading / {count} - a running count of the files downloaded. {date} - the current date (y-m-d) {date-long} - the date in long format {time} - the current time (Hh:mm:ss) {time-long} - the current time in long fmt {ticks} - the current timestamp as tics |
|
GenerateTemporaryFilename ( this filename ) : string | ||
GetAllCustomFilePaths ( this filename, string currentDirectory ) : IEnumerable |
||
GetCustomFilePath ( this filename, string currentDirectory = null ) : string | ||
GetCustomFilePathOrWalkUp ( this filename, string currentDirectory = null ) : string | ||
GetDirectoryStack ( this currentDirectory ) : IEnumerable |
||
GetFileInTempFolder ( this filename ) : string | ||
GetFileMD5 ( this filename ) : string |
Returns the MD5 Hash of a file as an uppercase hex string
|
|
GetFileSHA1 ( this filename ) : string | ||
GetFullPath ( this path ) : string |
Returns the full path of a string. Short circuts the process if the string is a known full path already. (ie, the result of a preivious GetFullPath())
|
|
GetMinimalPaths ( this |
||
GetMinimalPathsToDictionary ( this |
||
GetSubPath ( this parentPath, string childPath ) : string |
Gets the portion of the childPath that is a sub path of the parentPath Returns string.Empty if the childPath is not a sub path of the parent.
|
|
IsFolderEmpty ( string foldername ) : bool? | ||
IsSimpleSubPath ( this path ) : bool |
Tells whether a given path is a simple subpath. A simple subpath has the following characteristics: - No drive letter or colon - Does not start with a slash - Does not contain any path part sections consisting of just "." or ".." - Does not contain wildcards
|
|
IsSubPath ( this rootPath, string childPath ) : bool |
Determines if the childPath is a sub path of the rootPath
|
|
MarkFileTemporary ( this filename ) : string | ||
NameWithoutExt ( this fi ) : string |
Gets the name of a file minus it's extension, ie: if the file name is "test.exe", returns "test".
|
|
NormalizePath ( this path ) : string |
Translates paths starting with \??\ to regular paths.
|
|
ReadAllBytesFromFile ( this ms, string path ) : void |
Reads the contents of a file into a memory stream.
|
|
RelativePathTo ( this currentDirectory, string pathToMakeRelative ) : string |
Gets the relative path between two paths.
|
|
RemoveDeadLnks ( string folder ) : void | ||
RemoveEssentiallyEmptyFolders ( string folderName ) : bool | ||
RemoveInvalidSymlinks ( string directory = null, int maxdepth = 3 ) : void | ||
RemoveTemporaryFiles ( ) : void | ||
ResetTempFolder ( ) : void | ||
TryHardToDelete ( this location ) : void | ||
TryHardToMakeFileWriteable ( this filename ) : void |
This makes sure a file is writable by moving the original, copying this one back then deleting the original (or at least tryinghardtodelete the original). This allows us to modify locked files in place.
|
|
TryToHandlePendingRenames ( bool force = false ) : void | ||
WalkUpPath ( this filename, string currentDirectory = null ) : string | ||
WalkUpPaths ( this filenames, string currentDirectory = null ) : string | ||
Write ( this fileStream, byte data ) : int |
Writes the whole byte array to a filestream. (lazy!)
|
|
WriteAllBytesToFile ( this ms, string path ) : void |
Writes all bytes from the contents of a memorystream to file (as a binary file).
|
Method | Description | |
---|---|---|
FilesystemExtensions ( ) : System | ||
GetNextPart ( this path ) : string>.Tuple |
Gets the next part. Note: Make Eric document this?
|
public static CanonicalizePath ( this path, bool IsPotentiallyRelativePath = true ) : string | ||
path | this | |
IsPotentiallyRelativePath | bool | |
return | string |
public static CanonicalizePathIfLocalAndExists ( this filename ) : string | ||
filename | this | |
return | string |
public static CanonicalizePathWithWildcards ( this path ) : string | ||
path | this | |
return | string |
public static ChangeFileExtensionTo ( this currentFilename, string newExtension ) : string | ||
currentFilename | this | The current filename. |
newExtension | string | The new extension. |
return | string |
public static CreateWritableWorkingCopy ( this filename ) : string | ||
filename | this | |
return | string |
public static DirectoryEnumerateFilesSmarter ( this path, SearchOption searchOption ) : IEnumerable |
||
path | this | |
searchOption | SearchOption | |
return | IEnumerable |
public static DirectoryEnumerateFilesSmarter ( this path, string searchPattern, SearchOption searchOption ) : IEnumerable |
||
path | this | The path. |
searchPattern | string | The search pattern. |
searchOption | SearchOption | The search option. |
return | IEnumerable |
public static DirectoryExistsAndIsAccessible ( this path ) : bool | ||
path | this | The path. |
return | bool |
public static EnsureFileIsLocal ( this filename, string localFolder = null ) : string | ||
filename | this | |
localFolder | string | |
return | string |
public static FileIsLocalAndExists ( this filename ) : bool | ||
filename | this | |
return | bool |
public static FindFilesSmarter ( this pathMask, string subpathMask = null ) : IEnumerable |
||
pathMask | this | The path mask. |
subpathMask | string | the sub path mask. |
return | IEnumerable |
public static FindFilesSmarter ( this |
||
pathMasks | this |
The path masks. |
return | IEnumerable |
public static FindFilesSmarterComplex ( this pathMask, string pathPrefix = null ) : IEnumerable |
||
pathMask | this | |
pathPrefix | string | |
return | IEnumerable |
public static FindFilesSmarterComplex ( this |
||
pathMasks | this |
|
pathPrefix | string | |
return | IEnumerable |
public static FixFilepathSlashes ( this filepath ) : string | ||
filepath | this | The filepath. |
return | string |
public static FormatFilename ( this filename ) : string | ||
filename | this | The filename. |
return | string |
public static GenerateTemplatedFilename ( this filename, string filenameHint ) : string | ||
filename | this | The filename. |
filenameHint | string | The filename hint. |
return | string |
public static GenerateTemporaryFilename ( this filename ) : string | ||
filename | this | |
return | string |
public static GetAllCustomFilePaths ( this filename, string currentDirectory ) : IEnumerable |
||
filename | this | |
currentDirectory | string | |
return | IEnumerable |
public static GetCustomFilePath ( this filename, string currentDirectory = null ) : string | ||
filename | this | |
currentDirectory | string | |
return | string |
public static GetCustomFilePathOrWalkUp ( this filename, string currentDirectory = null ) : string | ||
filename | this | |
currentDirectory | string | |
return | string |
public static GetDirectoryStack ( this currentDirectory ) : IEnumerable |
||
currentDirectory | this | |
return | IEnumerable |
public static GetFileInTempFolder ( this filename ) : string | ||
filename | this | |
return | string |
public static GetFileMD5 ( this filename ) : string | ||
filename | this | the filename to retrive the hash for |
return | string |
public static GetFileSHA1 ( this filename ) : string | ||
filename | this | |
return | string |
public static GetFullPath ( this path ) : string | ||
path | this | The path. |
return | string |
public static GetMinimalPaths ( this |
||
paths | this |
|
return | IEnumerable |
public static GetMinimalPathsToDictionary ( this |
||
paths | this |
|
return | string>.IDictionary |
public static GetSubPath ( this parentPath, string childPath ) : string | ||
parentPath | this | The parent path. |
childPath | string | The child path. |
return | string |
public static IsFolderEmpty ( string foldername ) : bool? | ||
foldername | string | |
return | bool? |
public static IsSimpleSubPath ( this path ) : bool | ||
path | this | the path to check |
return | bool |
public static IsSubPath ( this rootPath, string childPath ) : bool | ||
rootPath | this | The root path. |
childPath | string | The child path. |
return | bool |
public static MarkFileTemporary ( this filename ) : string | ||
filename | this | |
return | string |
public static NameWithoutExt ( this fi ) : string | ||
fi | this | The fi. |
return | string |
public static NormalizePath ( this path ) : string | ||
path | this | The path. |
return | string |
public static ReadAllBytesFromFile ( this ms, string path ) : void | ||
ms | this | The ms. |
path | string | The path. |
return | void |
public static RelativePathTo ( this currentDirectory, string pathToMakeRelative ) : string | ||
currentDirectory | this | The current directory. |
pathToMakeRelative | string | The path to make relative. |
return | string |
public static RemoveDeadLnks ( string folder ) : void | ||
folder | string | |
return | void |
public static RemoveEssentiallyEmptyFolders ( string folderName ) : bool | ||
folderName | string | |
return | bool |
public static RemoveInvalidSymlinks ( string directory = null, int maxdepth = 3 ) : void | ||
directory | string | |
maxdepth | int | |
return | void |
public static RemoveTemporaryFiles ( ) : void | ||
return | void |
public static TryHardToDelete ( this location ) : void | ||
location | this | |
return | void |
public static TryHardToMakeFileWriteable ( this filename ) : void | ||
filename | this | |
return | void |
public static TryToHandlePendingRenames ( bool force = false ) : void | ||
force | bool | |
return | void |
public static WalkUpPath ( this filename, string currentDirectory = null ) : string | ||
filename | this | |
currentDirectory | string | |
return | string |
public static WalkUpPaths ( this filenames, string currentDirectory = null ) : string | ||
filenames | this | |
currentDirectory | string | |
return | string |
public static Write ( this fileStream, byte data ) : int | ||
fileStream | this | The file stream. |
data | byte | The data. |
return | int |
public static WriteAllBytesToFile ( this ms, string path ) : void | ||
ms | this | The ms. |
path | string | The path. |
return | void |