C# Класс Azavea.NijPredictivePolicing.Common.FileUtilities

Показать файл Открыть проект

Открытые методы

Метод Описание
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