C# Class AliaSQL.Core.FileSystem

Inheritance: IFileSystem
Afficher le fichier Open project: ClearMeasure/AliaSQL

Méthodes publiques

Méthode Description
FileExists ( string relativePath ) : bool
FileSystem ( ) : System
FileSystem ( IFileStreamFactory streamFactory ) : System
GetAllFilesWithExtensionWithinFolder ( string folder, string fileExtension ) : string[]
ReadFileIntoStreamReader ( string filename ) : StreamReader
ReadIntoFileStream ( string path ) : Stream
ReadTextFile ( string filename ) : string
SaveFile ( string filename, byte fileContent ) : void

Private Methods

Méthode Description
GetEncoding ( string filename ) : Encoding

Determines a text file's encoding by analyzing its byte order mark (BOM) Defaults to ASCII when detection of the text file's endianness fails. Function originally from http://stackoverflow.com/questions/3825390/effective-way-to-find-any-files-encoding

Method Details

FileExists() public méthode

public FileExists ( string relativePath ) : bool
relativePath string
Résultat bool

FileSystem() public méthode

public FileSystem ( ) : System
Résultat System

FileSystem() public méthode

public FileSystem ( IFileStreamFactory streamFactory ) : System
streamFactory IFileStreamFactory
Résultat System

GetAllFilesWithExtensionWithinFolder() public méthode

public GetAllFilesWithExtensionWithinFolder ( string folder, string fileExtension ) : string[]
folder string
fileExtension string
Résultat string[]

ReadFileIntoStreamReader() public méthode

public ReadFileIntoStreamReader ( string filename ) : StreamReader
filename string
Résultat System.IO.StreamReader

ReadIntoFileStream() public méthode

public ReadIntoFileStream ( string path ) : Stream
path string
Résultat Stream

ReadTextFile() public méthode

public ReadTextFile ( string filename ) : string
filename string
Résultat string

SaveFile() public méthode

public SaveFile ( string filename, byte fileContent ) : void
filename string
fileContent byte
Résultat void