C# 클래스 BaconBuilder.Model.FileHandlerShii

파일 보기 프로젝트 열기: Revelations/BaconApp

공개 메소드들

메소드 설명
FileHandlerShii ( string ext ) : System
GetFileFromMemory ( FileInfo fileInfo ) : IEnumerable

Gets the file from memory if it is loaded, otherwise null

HasFileBeenModified ( FileInfo info ) : bool

Checks whether the file source has been modified. It first checks whether the file has been recorded previously, then compares the modification (UTC) time.

IsFileInMemory ( FileInfo info ) : bool

Checks whether the file is in memory.

LoadDirectory ( DirectoryInfo dI ) : List
LoadFile ( FileInfo info ) : void

Loads and returns the content of the file into memory. Will not load files larger than the safe limit.

SaveFile ( FileInfo info ) : void

Saves the contents in memory to disk and updates the last write time (UTC).

SaveFile ( FileInfo info, IEnumerable contents ) : void

Updates the contents in memory, saves it to disk and updates the last write time.

UpdateFileContentInMemory ( FileInfo info, IEnumerable contents ) : void

Puts contents into the collection of file contents. Must be called before calling SaveFile(System.IO.FileInfo) to update the file contents.

비공개 메소드들

메소드 설명
GetKey ( FileSystemInfo fileInfo ) : string

Gets a usable key to use for retrieving contents from memory.

메소드 상세

FileHandlerShii() 공개 메소드

public FileHandlerShii ( string ext ) : System
ext string
리턴 System

GetFileFromMemory() 공개 메소드

Gets the file from memory if it is loaded, otherwise null
public GetFileFromMemory ( FileInfo fileInfo ) : IEnumerable
fileInfo System.IO.FileInfo
리턴 IEnumerable

HasFileBeenModified() 공개 메소드

Checks whether the file source has been modified. It first checks whether the file has been recorded previously, then compares the modification (UTC) time.
public HasFileBeenModified ( FileInfo info ) : bool
info System.IO.FileInfo The file info that allows for a uniform file pathing convention.
리턴 bool

IsFileInMemory() 공개 메소드

Checks whether the file is in memory.
public IsFileInMemory ( FileInfo info ) : bool
info System.IO.FileInfo
리턴 bool

LoadDirectory() 공개 메소드

public LoadDirectory ( DirectoryInfo dI ) : List
dI System.IO.DirectoryInfo
리턴 List

LoadFile() 공개 메소드

Loads and returns the content of the file into memory. Will not load files larger than the safe limit.
public LoadFile ( FileInfo info ) : void
info System.IO.FileInfo The file info that allows for a uniform file pathing convention.
리턴 void

SaveFile() 공개 메소드

Saves the contents in memory to disk and updates the last write time (UTC).
public SaveFile ( FileInfo info ) : void
info System.IO.FileInfo The file info that allows for a uniform file pathing convention.
리턴 void

SaveFile() 공개 메소드

Updates the contents in memory, saves it to disk and updates the last write time.
public SaveFile ( FileInfo info, IEnumerable contents ) : void
info System.IO.FileInfo
contents IEnumerable
리턴 void

UpdateFileContentInMemory() 공개 메소드

Puts contents into the collection of file contents. Must be called before calling SaveFile(System.IO.FileInfo) to update the file contents.
public UpdateFileContentInMemory ( FileInfo info, IEnumerable contents ) : void
info System.IO.FileInfo
contents IEnumerable
리턴 void