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
파일 보기 프로젝트 열기: Microsoft/sarif-sdk

공개 메소드들

메소드 설명
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