C# 클래스 Simulated.FileSystem

Represents a view on the file system. The underlying store could be a real file system or a simulated (in-memory) one. In either case, FileSystem and its helpers allow a user to interact with an abstraction of this storage. FileSystem also supports change tracking. If you call EnableRevertToHere, then you will begin tracking changes from that point. At any point you can dispose the FileSystem view or call RevertChanges to revert to the last save point. You can also call CommitChanges to commit all pending changes. Changes are written to the disk as they occcur. In case of an application crash changes will be saved, not rolled back. Each FileSystem instance is its own view of the storage with its own save point. Call Clone to create another view with the same underlying storage but an independent save point.
상속: IDisposable
파일 보기 프로젝트 열기: arlobelshee/SimulatableApi

Private Properties

프로퍼티 타입 설명
Clone FileSystem
CommitChanges System.Threading.Tasks.Task
Directory FsDirectory
File FsFile
FileSystem System
Real FileSystem
RevertChanges System.Threading.Tasks.Task
Simulated FileSystem

공개 메소드들

메소드 설명
Dispose ( ) : void

Rolls back any un-committed changes. If the FileSystem has a save point, then this Dispose will RevertChanges. If there is no save point or if all changes have been committed with CommitChanges, then disposing will have no effect.

EnableRevertToHere ( ) : void

Sets a save point. RevertChanges will revert to this save point. Does not override any existing save point. If a save point is already set then this call has no effect.

비공개 메소드들

메소드 설명
Clone ( ) : FileSystem
CommitChanges ( ) : System.Threading.Tasks.Task
Directory ( [ absolutePath ) : FsDirectory
File ( [ absoluteFilePath ) : FsFile
FileSystem ( [ disk ) : System
Real ( ) : FileSystem
RevertChanges ( ) : System.Threading.Tasks.Task
Simulated ( ) : FileSystem

메소드 상세

Dispose() 공개 메소드

Rolls back any un-committed changes. If the FileSystem has a save point, then this Dispose will RevertChanges. If there is no save point or if all changes have been committed with CommitChanges, then disposing will have no effect.
public Dispose ( ) : void
리턴 void

EnableRevertToHere() 공개 메소드

Sets a save point. RevertChanges will revert to this save point. Does not override any existing save point. If a save point is already set then this call has no effect.
public EnableRevertToHere ( ) : void
리턴 void