TestFileSystem Class

Summary

A file system for testing that uses a single file provider.
Assembly
Wyam.Testing.dll
Namespace
Wyam.Testing.IO
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IFileSystem"] click Interface0 "/api/Wyam.Common.IO/IFileSystem" Type-.->Interface1["IReadOnlyFileSystem"] click Interface1 "/api/Wyam.Common.IO/IReadOnlyFileSystem" Type["TestFileSystem"] class Type type-node

Syntax

public class TestFileSystem : IFileSystem, IReadOnlyFileSystem

Properties

Name Value Summary
FileProvider TestFileProvider
The file provider to use for this file system.
FileProviders IFileProviderCollection
Gets the file providers.
InputPaths PathCollection<DirectoryPath>
Gets the input paths collection which can be used to add or remove input paths.
OutputPath DirectoryPath
Gets or sets the output path.
RootPath DirectoryPath
Gets or sets the root path.
TempPath DirectoryPath
Gets or sets the temporary file path.

Methods

Name Value Summary
GetContainingInputPath(NormalizedPath) DirectoryPath
Gets the absolute input path that contains the specified file or directory. If the provided file or directory path is absolute, this returns the input path that contains the specified path (note that the specified file or directory does not need to exist and this just returns the input path that would contain the file or directory based only on path information). If the provided path is relative, this checks all input paths for the existence of the file or directory and returns the first one where it exists.
GetDirectory(DirectoryPath) IDirectory
Gets an absolute directory.
GetFile(FilePath) IFile
Gets an absolute file.
GetFileProvider(NormalizedPath) IFileProvider
Gets the registered file provider for a specified path.
GetFiles(IDirectory, IEnumerable<string>) IEnumerable<IFile>
Gets matching files based on globbing patterns and/or absolute paths. If any absolute paths are provided, only those that actually exist are returned.
GetFiles(IDirectory, string[]) IEnumerable<IFile>
Gets matching files based on globbing patterns and/or absolute paths. If any absolute paths are provided, only those that actually exist are returned.
GetFiles(IEnumerable<string>) IEnumerable<IFile>
Gets matching files based on globbing patterns from the root path or absolute paths.
GetFiles(string[]) IEnumerable<IFile>
Gets matching files based on globbing patterns from the root path or absolute paths.
GetInputDirectories() IReadOnlyList<IDirectory>
Gets all absolute input directories.
GetInputDirectory(DirectoryPath) IDirectory
Gets a directory representing an input.
GetInputFile(FilePath) IFile
Gets a file representing an input.
GetInputFiles(IEnumerable<string>) IEnumerable<IFile>
Gets matching input files based on globbing patterns and/or absolute paths. If any absolute paths are provided, only those that actually exist are returned.
GetInputFiles(string[]) IEnumerable<IFile>
Gets matching input files based on globbing patterns and/or absolute paths. If any absolute paths are provided, only those that actually exist are returned.
GetOutputDirectory(DirectoryPath) IDirectory
Gets a directory representing an output.
GetOutputFile(FilePath) IFile
Gets a file representing an output.
GetOutputPath(DirectoryPath) DirectoryPath
Gets an output directory path by combining it with the root path and output path.
GetOutputPath(FilePath) FilePath
Gets an output file path by combining it with the root path and output path.
GetRootDirectory(DirectoryPath) IDirectory
Gets a directory representing a root directory.
GetRootFile(FilePath) IFile
Gets a file representing a root file.
GetTempDirectory(DirectoryPath) IDirectory
Gets a directory representing temp files.
GetTempFile() IFile
Gets a file representing a temp file with a random file name.
GetTempFile(FilePath) IFile
Gets a file representing a temp file.
GetTempPath(DirectoryPath) DirectoryPath
Gets a temp directory path by combining it with the root path and temp path.
GetTempPath(FilePath) FilePath
Gets a temp file path by combining it with the root path and temp path.
GitHub