C# 클래스 Azavea.NijPredictivePolicing.Common.FileUtilities

파일 보기 프로젝트 열기: azavea/acs-alchemist

공개 메소드들

메소드 설명
CleanPath ( string OutputFolder ) : string
FindFileNameInZipLike ( string zipFileName, string pattern ) : List

Uses Ionic.Zip library to search a compressed file for a given pattern

GetApplicationPath ( ) : string
PathCombine ( ) : string

Like Path.Combine(), only works for an arbitrary number of arguments

PathEnsure ( string basepath ) : string

Given a basepath and a list of names of subdirectories, creates the subdirectories if necessary. Throws exceptions on error.

SafePathEnsure ( string basepath ) : string

Wrapper around PathEnsure() that doesn't throw exceptions. Returns "" on error and prints an error message to _log

TryChangeCreationTime ( string filename, System.DateTime newTime ) : bool

Try changing the file's creation time without exceptions. Returns true on success, false on failure.

TryChangeLastWriteTime ( string filename, System.DateTime newTime ) : bool

Try changing the file's last write time without exceptions. Returns true on success, false on failure.

TryDelete ( string filename ) : bool

Delete without exceptions. Returns true on success, false on failure.

UnzipFileTo ( string basePath, string zipFileName ) : bool

Uses Ionic.Zip library to expand a file (without overwriting) to a given location

메소드 상세

CleanPath() 공개 정적인 메소드

public static CleanPath ( string OutputFolder ) : string
OutputFolder string
리턴 string

FindFileNameInZipLike() 공개 정적인 메소드

Uses Ionic.Zip library to search a compressed file for a given pattern
public static FindFileNameInZipLike ( string zipFileName, string pattern ) : List
zipFileName string
pattern string
리턴 List

GetApplicationPath() 공개 정적인 메소드

public static GetApplicationPath ( ) : string
리턴 string

PathCombine() 공개 정적인 메소드

Like Path.Combine(), only works for an arbitrary number of arguments
public static PathCombine ( ) : string
리턴 string

PathEnsure() 공개 정적인 메소드

Given a basepath and a list of names of subdirectories, creates the subdirectories if necessary. Throws exceptions on error.
public static PathEnsure ( string basepath ) : string
basepath string A path to a directory that already exists
리턴 string

SafePathEnsure() 공개 정적인 메소드

Wrapper around PathEnsure() that doesn't throw exceptions. Returns "" on error and prints an error message to _log
public static SafePathEnsure ( string basepath ) : string
basepath string
리턴 string

TryChangeCreationTime() 공개 정적인 메소드

Try changing the file's creation time without exceptions. Returns true on success, false on failure.
public static TryChangeCreationTime ( string filename, System.DateTime newTime ) : bool
filename string
newTime System.DateTime
리턴 bool

TryChangeLastWriteTime() 공개 정적인 메소드

Try changing the file's last write time without exceptions. Returns true on success, false on failure.
public static TryChangeLastWriteTime ( string filename, System.DateTime newTime ) : bool
filename string
newTime System.DateTime
리턴 bool

TryDelete() 공개 정적인 메소드

Delete without exceptions. Returns true on success, false on failure.
public static TryDelete ( string filename ) : bool
filename string
리턴 bool

UnzipFileTo() 공개 정적인 메소드

Uses Ionic.Zip library to expand a file (without overwriting) to a given location
public static UnzipFileTo ( string basePath, string zipFileName ) : bool
basePath string
zipFileName string
리턴 bool