TestDirectory Class

Summary

Represents a directory. Not all implementations will support all available methods and may throw System.NotSupportedException.
Assembly
Wyam.Testing.dll
Namespace
Wyam.Testing.IO
Interfaces
Base Types
  • Object
graph BT Type-->Base0["Object"] Type-.->Interface0["IDirectory"] click Interface0 "/api/Wyam.Common.IO/IDirectory" Type-.->Interface1["IFileSystemEntry"] click Interface1 "/api/Wyam.Common.IO/IFileSystemEntry" Type["TestDirectory"] class Type type-node

Syntax

public class TestDirectory : IDirectory, IFileSystemEntry

Constructors

Properties

Name Value Summary
Exists bool
Gets a value indicating whether this Wyam.Common.IO.IFileSystemEntry exists.
IsCaseSensitive bool
Indicates whether this directory (and files/directories under it) are case-sensitive.
Parent IDirectory
Gets the parent directory or null if the directory is a root.
Path DirectoryPath
Gets the path to the directory.

Methods

Name Value Summary
Create() void
Creates the directory, including any necessary parent directories.
Delete(bool) void
Deletes the directory.
GetDirectories(SearchOption) IEnumerable<IDirectory>
Gets directories matching the specified filter and scope.
GetDirectory(DirectoryPath) IDirectory
Gets a directory by combining it's path with the current directory's path. The specified directory path must be relative.
GetFile(FilePath) IFile
Gets a file by combining it's path with the current directory's path. The specified file path must be relative.
GetFiles(SearchOption) IEnumerable<IFile>
Gets files matching the specified filter and scope.
GitHub