C# Класс 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.
Наследование: IFileSystem
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

FileExists() публичный Метод

Determines whether the specified file exists.
public FileExists ( string path ) : bool
path string /// The file to check. ///
Результат bool

GetFullPath() публичный Метод

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. ///
Результат string

ReadAllLines() публичный Метод

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. ///
Результат string[]

ReadAllText() публичный Метод

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. ///
Результат string