C# 클래스 Octopus.Cli.Util.OctopusPhysicalFileSystem

상속: IOctopusFileSystem
파일 보기 프로젝트 열기: OctopusDeploy/Octo.exe

공개 메소드들

메소드 설명
AppendToFile ( string path, string contents ) : void
CopyDirectory ( string sourceDirectory, string targetDirectory, CancellationToken cancel, int overwriteFileRetryAttempts = 3 ) : void
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

비공개 메소드들

메소드 설명
GetDiskFreeSpaceEx ( string lpDirectoryName, ulong &lpFreeBytesAvailable, ulong &lpTotalNumberOfBytes, ulong &lpTotalNumberOfFreeBytes ) : bool
GetTempBasePath ( ) : string

메소드 상세

AppendToFile() 공개 메소드

public AppendToFile ( string path, string contents ) : void
path string
contents string
리턴 void

CopyDirectory() 공개 메소드

public CopyDirectory ( string sourceDirectory, string targetDirectory, CancellationToken cancel, int overwriteFileRetryAttempts = 3 ) : void
sourceDirectory string
targetDirectory string
cancel System.Threading.CancellationToken
overwriteFileRetryAttempts int
리턴 void

CopyDirectory() 공개 메소드

public CopyDirectory ( string sourceDirectory, string targetDirectory, int overwriteFileRetryAttempts = 3 ) : void
sourceDirectory string
targetDirectory string
overwriteFileRetryAttempts int
리턴 void

CopyFile() 공개 메소드

public CopyFile ( string sourceFile, string targetFile, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus
sourceFile string
targetFile string
overwriteFileRetryAttempts int
리턴 ReplaceStatus

CreateTemporaryDirectory() 공개 메소드

public CreateTemporaryDirectory ( ) : string
리턴 string

CreateTemporaryFile() 공개 메소드

public CreateTemporaryFile ( string extension, string &path ) : Stream
extension string
path string
리턴 Stream

DeleteDirectory() 공개 메소드

public DeleteDirectory ( string path ) : void
path string
리턴 void

DeleteDirectory() 공개 메소드

public DeleteDirectory ( string path, DeletionOptions options ) : void
path string
options DeletionOptions
리턴 void

DeleteFile() 공개 메소드

public DeleteFile ( string path ) : void
path string
리턴 void

DeleteFile() 공개 메소드

public DeleteFile ( string path, DeletionOptions options ) : void
path string
options DeletionOptions
리턴 void

DirectoryExists() 공개 메소드

public DirectoryExists ( string path ) : bool
path string
리턴 bool

DirectoryIsEmpty() 공개 메소드

public DirectoryIsEmpty ( string path ) : bool
path string
리턴 bool

EnsureDirectoryExists() 공개 메소드

public EnsureDirectoryExists ( string directoryPath ) : void
directoryPath string
리턴 void

EnsureDiskHasEnoughFreeSpace() 공개 메소드

public EnsureDiskHasEnoughFreeSpace ( string directoryPath ) : void
directoryPath string
리턴 void

EnsureDiskHasEnoughFreeSpace() 공개 메소드

public EnsureDiskHasEnoughFreeSpace ( string directoryPath, long requiredSpaceInBytes ) : void
directoryPath string
requiredSpaceInBytes long
리턴 void

EnumerateDirectories() 공개 메소드

public EnumerateDirectories ( string parentDirectoryPath ) : IEnumerable
parentDirectoryPath string
리턴 IEnumerable

EnumerateDirectoriesRecursively() 공개 메소드

public EnumerateDirectoriesRecursively ( string parentDirectoryPath ) : IEnumerable
parentDirectoryPath string
리턴 IEnumerable

EnumerateFiles() 공개 메소드

public EnumerateFiles ( string parentDirectoryPath ) : IEnumerable
parentDirectoryPath string
리턴 IEnumerable

EnumerateFilesRecursively() 공개 메소드

public EnumerateFilesRecursively ( string parentDirectoryPath ) : IEnumerable
parentDirectoryPath string
리턴 IEnumerable

EqualHash() 공개 메소드

public EqualHash ( Stream first, Stream second ) : bool
first Stream
second Stream
리턴 bool

FileExists() 공개 메소드

public FileExists ( string path ) : bool
path string
리턴 bool

GetFileSize() 공개 메소드

public GetFileSize ( string path ) : long
path string
리턴 long

GetFullPath() 공개 메소드

public GetFullPath ( string relativeOrAbsoluteFilePath ) : string
relativeOrAbsoluteFilePath string
리턴 string

MoveFile() 공개 메소드

public MoveFile ( string sourceFile, string destinationFile ) : void
sourceFile string
destinationFile string
리턴 void

OctopusPhysicalFileSystem() 공개 메소드

public OctopusPhysicalFileSystem ( ILogger log ) : System
log ILogger
리턴 System

OpenFile() 공개 메소드

public OpenFile ( string path, FileAccess access, FileShare share ) : Stream
path string
access FileAccess
share FileShare
리턴 Stream

OpenFile() 공개 메소드

public OpenFile ( string path, FileMode mode, FileAccess access, FileShare share ) : Stream
path string
mode FileMode
access FileAccess
share FileShare
리턴 Stream

OverwriteAndDelete() 공개 메소드

public OverwriteAndDelete ( string originalFile, string temporaryReplacement ) : void
originalFile string
temporaryReplacement string
리턴 void

OverwriteFile() 공개 메소드

public OverwriteFile ( string path, string contents ) : void
path string
contents string
리턴 void

ReadAllText() 공개 메소드

public ReadAllText ( string scriptFile ) : string
scriptFile string
리턴 string

ReadFile() 공개 메소드

public ReadFile ( string path ) : string
path string
리턴 string

RemoveInvalidFileNameChars() 공개 메소드

public RemoveInvalidFileNameChars ( string path ) : string
path string
리턴 string

Replace() 공개 메소드

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.
public Replace ( string oldFilePath, Stream newStream, int overwriteFileRetryAttempts = 3 ) : ReplaceStatus
oldFilePath string
newStream Stream
overwriteFileRetryAttempts int
리턴 ReplaceStatus

WriteAllBytes() 공개 메소드

public WriteAllBytes ( string filePath, byte data ) : void
filePath string
data byte
리턴 void