C# Class Microsoft.CodeAnalysis.Sarif.Driver.FileSystem

A wrapper class for accessing the file system.
Clients should use this class rather directly using the .NET file system classes, so they can mock the IFileSystem interface in unit tests.
Inheritance: IFileSystem
Afficher le fichier Open project: Microsoft/sarif-sdk

Méthodes publiques

Méthode Description
FileExists ( string path ) : bool

Determines whether the specified file exists.

GetFullPath ( string path ) : string

Returns the absolute path for the specified path string.

ReadAllLines ( string path ) : string[]

Opens a text file, reads all lines of the file, and then closes the file.

ReadAllText ( string path ) : string

Opens a text file, reads all text in the file as a single string, and then closes the file.

Method Details

FileExists() public méthode

Determines whether the specified file exists.
public FileExists ( string path ) : bool
path string /// The file to check. ///
Résultat bool

GetFullPath() public méthode

Returns the absolute path for the specified path string.
public GetFullPath ( string path ) : string
path string /// The file or directory for which to obtain absolute path information. ///
Résultat string

ReadAllLines() public méthode

Opens a text file, reads all lines of the file, and then closes the file.
public ReadAllLines ( string path ) : string[]
path string /// The file to open for reading. ///
Résultat string[]

ReadAllText() public méthode

Opens a text file, reads all text in the file as a single string, and then closes the file.
public ReadAllText ( string path ) : string
path string /// The file to open for reading. ///
Résultat string