C# Class ScriptCs.FileSystem

Inheritance: IFileSystem
Show file Open project: scriptcs/scriptcs Class Usage Examples

Public Methods

Method Description
Copy ( string source, string dest, bool overwrite ) : void
CopyDirectory ( string source, string dest, bool overwrite ) : void
CreateDirectory ( string path, bool hidden ) : void
CreateFileStream ( string filePath, FileMode mode ) : Stream
DeleteDirectory ( string path ) : void
DirectoryExists ( string path ) : bool
EnumerateDirectories ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
EnumerateFiles ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
EnumerateFilesAndDirectories ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
FileDelete ( string path ) : void
FileExists ( string path ) : bool
GetFullPath ( string path ) : string
GetLastWriteTime ( string file ) : System.DateTime
GetWorkingDirectory ( string path ) : string
IsPathRooted ( string path ) : bool
Move ( string source, string dest ) : void
MoveDirectory ( string source, string dest ) : void
ReadFile ( string path ) : string
ReadFileLines ( string path ) : string[]
SplitLines ( string value ) : IEnumerable
WriteAllBytes ( string filePath, byte bytes ) : void
WriteToFile ( string path, string text ) : void

Method Details

Copy() public method

public Copy ( string source, string dest, bool overwrite ) : void
source string
dest string
overwrite bool
return void

CopyDirectory() public method

public CopyDirectory ( string source, string dest, bool overwrite ) : void
source string
dest string
overwrite bool
return void

CreateDirectory() public method

public CreateDirectory ( string path, bool hidden ) : void
path string
hidden bool
return void

CreateFileStream() public method

public CreateFileStream ( string filePath, FileMode mode ) : Stream
filePath string
mode FileMode
return Stream

DeleteDirectory() public method

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

DirectoryExists() public method

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

EnumerateDirectories() public method

public EnumerateDirectories ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
dir string
searchPattern string
searchOption SearchOption
return IEnumerable

EnumerateFiles() public method

public EnumerateFiles ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
dir string
searchPattern string
searchOption SearchOption
return IEnumerable

EnumerateFilesAndDirectories() public method

public EnumerateFilesAndDirectories ( string dir, string searchPattern, SearchOption searchOption = SearchOption.AllDirectories ) : IEnumerable
dir string
searchPattern string
searchOption SearchOption
return IEnumerable

FileDelete() public method

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

FileExists() public method

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

GetFullPath() public method

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

GetLastWriteTime() public method

public GetLastWriteTime ( string file ) : System.DateTime
file string
return System.DateTime

GetWorkingDirectory() public method

public GetWorkingDirectory ( string path ) : string
path string
return string

IsPathRooted() public method

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

Move() public method

public Move ( string source, string dest ) : void
source string
dest string
return void

MoveDirectory() public method

public MoveDirectory ( string source, string dest ) : void
source string
dest string
return void

ReadFile() public method

public ReadFile ( string path ) : string
path string
return string

ReadFileLines() public method

public ReadFileLines ( string path ) : string[]
path string
return string[]

SplitLines() public method

public SplitLines ( string value ) : IEnumerable
value string
return IEnumerable

WriteAllBytes() public method

public WriteAllBytes ( string filePath, byte bytes ) : void
filePath string
bytes byte
return void

WriteToFile() public method

public WriteToFile ( string path, string text ) : void
path string
text string
return void