C# 클래스 MonkeyWrench.FileUtilities

파일 보기 프로젝트 열기: rolfbjarne/monkeywrench

공개 메소드들

메소드 설명
CalculateMD5 ( Stream str ) : string
CreateFilename ( string md5, bool is_gz_compressed, bool create_directory ) : string

Given the specified md5, returns the full path of the file as it would be stored in the filesystem.

GZCompress ( string filename ) : string

GZ-compresses a file and returns the filename of the compressed file. The caller should delete the compressed file once done with it. Returns null if the file couldn't be compressed.

GZUncompress ( string filename ) : bool
GlobToRegExp ( string expression ) : string
TryDeleteDirectoryRecursive ( string directory ) : void

Tries to delete a directory recursively. Will try as hard as possible to delete as much as possible, i.e. it won't stop if for instance one file can't be deleted.

TryDeleteFile ( string filename ) : void

Tries to delete a file, does not throw any exceptions.

비공개 메소드들

메소드 설명
ConvertGroupSubexpression ( char carr, int &pos ) : StringBuilder
MD5BytesToString ( byte bytes ) : string
TryDeleteDirectoryRecursive ( string root, string path ) : void

메소드 상세

CalculateMD5() 공개 정적인 메소드

public static CalculateMD5 ( Stream str ) : string
str Stream
리턴 string

CreateFilename() 공개 정적인 메소드

Given the specified md5, returns the full path of the file as it would be stored in the filesystem.
public static CreateFilename ( string md5, bool is_gz_compressed, bool create_directory ) : string
md5 string
is_gz_compressed bool
create_directory bool
리턴 string

GZCompress() 공개 정적인 메소드

GZ-compresses a file and returns the filename of the compressed file. The caller should delete the compressed file once done with it. Returns null if the file couldn't be compressed.
public static GZCompress ( string filename ) : string
filename string
리턴 string

GZUncompress() 공개 정적인 메소드

public static GZUncompress ( string filename ) : bool
filename string
리턴 bool

GlobToRegExp() 공개 정적인 메소드

public static GlobToRegExp ( string expression ) : string
expression string
리턴 string

TryDeleteDirectoryRecursive() 공개 정적인 메소드

Tries to delete a directory recursively. Will try as hard as possible to delete as much as possible, i.e. it won't stop if for instance one file can't be deleted.
public static TryDeleteDirectoryRecursive ( string directory ) : void
directory string
리턴 void

TryDeleteFile() 공개 정적인 메소드

Tries to delete a file, does not throw any exceptions.
public static TryDeleteFile ( string filename ) : void
filename string
리턴 void