MSBuildFileSystemBase Class

Definition

Abstracts away some file system operations.

Implementations:

  • must be thread safe
  • may cache some or all the calls.
public ref class MSBuildFileSystemBase abstract
public abstract class MSBuildFileSystemBase
type MSBuildFileSystemBase = class
Public MustInherit Class MSBuildFileSystemBase
Inheritance
MSBuildFileSystemBase

Constructors

MSBuildFileSystemBase()

Methods

DirectoryExists(String)

Use this for Directory.Exists(path)

EnumerateDirectories(String, String, SearchOption)

Use this for Directory.EnumerateFolders(path, pattern, option)

EnumerateFiles(String, String, SearchOption)

Use this for Directory.EnumerateFiles(path, pattern, option)

EnumerateFileSystemEntries(String, String, SearchOption)

Use this for Directory.EnumerateFileSystemEntries(path, pattern, option)

FileExists(String)

Use this for File.Exists(path)

FileOrDirectoryExists(String)

Use this for File.Exists(path) || Directory.Exists(path)

GetAttributes(String)

Use this for File.GetAttributes()

GetFileStream(String, FileMode, FileAccess, FileShare)

Use this for new FileStream(path, mode, access, share)

GetLastWriteTimeUtc(String)

Use this for File.GetLastWriteTimeUtc(path)

ReadFile(String)

Use this for var sr = new StreamReader(path)

ReadFileAllBytes(String)

Use this for File.ReadAllBytes(path)

ReadFileAllText(String)

Use this for File.ReadAllText(path)

Applies to