C# Class NuSelfUpdate.Tests.Helpers.MockFileSystem

Inheritance: IExtendedFileSystem
显示文件 Open project: caleb-vear/NuSelfUpdate Class Usage Examples

Public Methods

Method Description
AddFile ( string path ) : void
AddFile ( string path, Func getStream ) : void
AddFile ( string path, Stream stream ) : void
AddFile ( string path, string content ) : void
CreateDirectory ( string path ) : void
DeleteDirectory ( string path, bool recursive = false ) : void
DeleteFile ( string path ) : void
DirectoryExists ( string path ) : bool
FileExists ( string path ) : bool
GetCreated ( string path ) : DateTimeOffset
GetDirectories ( string path ) : IEnumerable
GetFiles ( string path ) : IEnumerable
GetFiles ( string path, string filter ) : IEnumerable
GetFullPath ( string path ) : string
GetLastModified ( string path ) : DateTimeOffset
MockFileSystem ( string appDirectory ) : System
MoveFile ( string sourcePath, string destinationPath ) : void
OpenFile ( string path ) : Stream
ReadAllText ( string path ) : string

Private Methods

Method Description
GetFilterRegex ( string wildcard ) : Regex
GetPattern ( string token ) : string
IndexOfAll ( string value, char ch ) : IEnumerable
InternalGetDirectories ( string path ) : IEnumerable

Method Details

AddFile() public method

public AddFile ( string path ) : void
path string
return void

AddFile() public method

public AddFile ( string path, Func getStream ) : void
path string
getStream Func
return void

AddFile() public method

public AddFile ( string path, Stream stream ) : void
path string
stream Stream
return void

AddFile() public method

public AddFile ( string path, string content ) : void
path string
content string
return void

CreateDirectory() public method

public CreateDirectory ( string path ) : void
path string
return void

DeleteDirectory() public method

public DeleteDirectory ( string path, bool recursive = false ) : void
path string
recursive bool
return void

DeleteFile() public method

public DeleteFile ( string path ) : void
path string
return void

DirectoryExists() public method

public DirectoryExists ( string path ) : bool
path string
return bool

FileExists() public method

public FileExists ( string path ) : bool
path string
return bool

GetCreated() public method

public GetCreated ( string path ) : DateTimeOffset
path string
return DateTimeOffset

GetDirectories() public method

public GetDirectories ( string path ) : IEnumerable
path string
return IEnumerable

GetFiles() public method

public GetFiles ( string path ) : IEnumerable
path string
return IEnumerable

GetFiles() public method

public GetFiles ( string path, string filter ) : IEnumerable
path string
filter string
return IEnumerable

GetFullPath() public method

public GetFullPath ( string path ) : string
path string
return string

GetLastModified() public method

public GetLastModified ( string path ) : DateTimeOffset
path string
return DateTimeOffset

MockFileSystem() public method

public MockFileSystem ( string appDirectory ) : System
appDirectory string
return System

MoveFile() public method

public MoveFile ( string sourcePath, string destinationPath ) : void
sourcePath string
destinationPath string
return void

OpenFile() public method

public OpenFile ( string path ) : Stream
path string
return Stream

ReadAllText() public method

public ReadAllText ( string path ) : string
path string
return string