Method | Description | |
---|---|---|
AppendToFile ( string path, string contents ) : void | ||
CopyDirectory ( string sourceDirectory, string targetDirectory, |
||
CopyDirectory ( string sourceDirectory, string targetDirectory, int overwriteFileRetryAttempts = 3 ) : void | ||
CopyFile ( string sourceFile, string targetFile, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus | ||
CreateTemporaryDirectory ( ) : string | ||
CreateTemporaryFile ( string extension, string &path ) : Stream | ||
DeleteDirectory ( string path ) : void | ||
DeleteDirectory ( string path, DeletionOptions options ) : void | ||
DeleteFile ( string path ) : void | ||
DeleteFile ( string path, DeletionOptions options ) : void | ||
DirectoryExists ( string path ) : bool | ||
DirectoryIsEmpty ( string path ) : bool | ||
EnsureDirectoryExists ( string directoryPath ) : void | ||
EnsureDiskHasEnoughFreeSpace ( string directoryPath ) : void | ||
EnsureDiskHasEnoughFreeSpace ( string directoryPath, long requiredSpaceInBytes ) : void | ||
EnumerateDirectories ( string parentDirectoryPath ) : IEnumerable |
||
EnumerateDirectoriesRecursively ( string parentDirectoryPath ) : IEnumerable |
||
EnumerateFiles ( string parentDirectoryPath ) : IEnumerable |
||
EnumerateFilesRecursively ( string parentDirectoryPath ) : IEnumerable |
||
EqualHash ( Stream first, Stream second ) : bool | ||
FileExists ( string path ) : bool | ||
GetFileSize ( string path ) : long | ||
GetFullPath ( string relativeOrAbsoluteFilePath ) : string | ||
MoveFile ( string sourceFile, string destinationFile ) : void | ||
OctopusPhysicalFileSystem ( ILogger log ) : System | ||
OpenFile ( string path, FileAccess access, FileShare share ) : Stream | ||
OpenFile ( string path, FileMode mode, FileAccess access, FileShare share ) : Stream | ||
OverwriteAndDelete ( string originalFile, string temporaryReplacement ) : void | ||
OverwriteFile ( string path, string contents ) : void | ||
ReadAllText ( string scriptFile ) : string | ||
ReadFile ( string path ) : string | ||
RemoveInvalidFileNameChars ( string path ) : string | ||
Replace ( string oldFilePath, Stream newStream, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus |
Creates, updates or skips a file based on a file content comparison Useful for cases where you do not want a file's timestamp to change when overwriting it with identical contents or you want clearer logging as to what changed. |
|
WriteAllBytes ( string filePath, byte data ) : void |
Method | Description | |
---|---|---|
GetDiskFreeSpaceEx ( string lpDirectoryName, ulong &lpFreeBytesAvailable, ulong &lpTotalNumberOfBytes, ulong &lpTotalNumberOfFreeBytes ) : bool | ||
GetTempBasePath ( ) : string |
public AppendToFile ( string path, string contents ) : void | ||
path | string | |
contents | string | |
return | void |
public CopyDirectory ( string sourceDirectory, string targetDirectory, |
||
sourceDirectory | string | |
targetDirectory | string | |
cancel | ||
overwriteFileRetryAttempts | int | |
return | void |
public CopyDirectory ( string sourceDirectory, string targetDirectory, int overwriteFileRetryAttempts = 3 ) : void | ||
sourceDirectory | string | |
targetDirectory | string | |
overwriteFileRetryAttempts | int | |
return | void |
public CopyFile ( string sourceFile, string targetFile, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus | ||
sourceFile | string | |
targetFile | string | |
overwriteFileRetryAttempts | int | |
return | ReplaceStatus |
public CreateTemporaryFile ( string extension, string &path ) : Stream | ||
extension | string | |
path | string | |
return | Stream |
public DeleteDirectory ( string path ) : void | ||
path | string | |
return | void |
public DeleteDirectory ( string path, DeletionOptions options ) : void | ||
path | string | |
options | DeletionOptions | |
return | void |
public DeleteFile ( string path, DeletionOptions options ) : void | ||
path | string | |
options | DeletionOptions | |
return | void |
public DirectoryExists ( string path ) : bool | ||
path | string | |
return | bool |
public DirectoryIsEmpty ( string path ) : bool | ||
path | string | |
return | bool |
public EnsureDirectoryExists ( string directoryPath ) : void | ||
directoryPath | string | |
return | void |
public EnsureDiskHasEnoughFreeSpace ( string directoryPath ) : void | ||
directoryPath | string | |
return | void |
public EnsureDiskHasEnoughFreeSpace ( string directoryPath, long requiredSpaceInBytes ) : void | ||
directoryPath | string | |
requiredSpaceInBytes | long | |
return | void |
public EnumerateDirectories ( string parentDirectoryPath ) : IEnumerable |
||
parentDirectoryPath | string | |
return | IEnumerable |
public EnumerateDirectoriesRecursively ( string parentDirectoryPath ) : IEnumerable |
||
parentDirectoryPath | string | |
return | IEnumerable |
public EnumerateFiles ( string parentDirectoryPath ) : IEnumerable |
||
parentDirectoryPath | string | |
return | IEnumerable |
public EnumerateFilesRecursively ( string parentDirectoryPath ) : IEnumerable |
||
parentDirectoryPath | string | |
return | IEnumerable |
public EqualHash ( Stream first, Stream second ) : bool | ||
first | Stream | |
second | Stream | |
return | bool |
public GetFullPath ( string relativeOrAbsoluteFilePath ) : string | ||
relativeOrAbsoluteFilePath | string | |
return | string |
public MoveFile ( string sourceFile, string destinationFile ) : void | ||
sourceFile | string | |
destinationFile | string | |
return | void |
public OctopusPhysicalFileSystem ( ILogger log ) : System | ||
log | ILogger | |
return | System |
public OpenFile ( string path, FileAccess access, FileShare share ) : Stream | ||
path | string | |
access | FileAccess | |
share | FileShare | |
return | Stream |
public OpenFile ( string path, FileMode mode, FileAccess access, FileShare share ) : Stream | ||
path | string | |
mode | FileMode | |
access | FileAccess | |
share | FileShare | |
return | Stream |
public OverwriteAndDelete ( string originalFile, string temporaryReplacement ) : void | ||
originalFile | string | |
temporaryReplacement | string | |
return | void |
public OverwriteFile ( string path, string contents ) : void | ||
path | string | |
contents | string | |
return | void |
public ReadAllText ( string scriptFile ) : string | ||
scriptFile | string | |
return | string |
public RemoveInvalidFileNameChars ( string path ) : string | ||
path | string | |
return | string |
public Replace ( string oldFilePath, Stream newStream, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus | ||
oldFilePath | string | |
newStream | Stream | |
overwriteFileRetryAttempts | int | |
return | ReplaceStatus |
public WriteAllBytes ( string filePath, byte data ) : void | ||
filePath | string | |
data | byte | |
return | void |