Represents a directory. Not all implementations will support all
available methods and may throw
System.NotSupportedException
.
- Namespace
- Statiq
.Common - Interfaces
- Implementing Types
graph BT
Type-.->Interface0["IFileSystemEntry"]
click Interface0 "/api/Statiq.Common/IFileSystemEntry"
Type-.->Interface1["IDisplayable"]
click Interface1 "/api/Statiq.Common/IDisplayable"
Type["IDirectory"]
class Type type-node
Implementing0["TestDirectory"]-.->Type
click Implementing0 "/api/Statiq.Testing/TestDirectory"
Syntax
public interface IDirectory : IFileSystemEntry, IDisplayable
Properties
Name | Property Type | Summary |
---|---|---|
Parent | IDirectory |
Gets the parent directory.
|
Path | NormalizedPath |
Gets the path to the directory.
|
Methods
Name | Return Value | Summary |
---|---|---|
Create |
void |
Creates the directory, including any necessary parent directories.
|
Delete |
void |
Deletes the directory.
|
GetDirectories |
IEnumerable |
Gets directories matching the specified filter and scope.
|
GetDirectory |
IDirectory |
Gets a directory by combining it's path with the current directory's path.
The specified directory path must be relative.
|
GetFile |
IFile |
Gets a file by combining it's path with the current directory's path.
The specified file path must be relative.
|
GetFiles |
IEnumerable |
Gets files matching the specified filter and scope.
|
MoveTo |
void |
Moves the directory and it's contents to a new parent directory.
|
MoveTo |
void |
Moves the directory and it's contents to a new parent path.
|
Extension Methods
Name | Value | Summary |
---|---|---|
ThrowIfNull |
T |
From GuardExtensions
|
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToDocument |
IDocument | |
ToSafeDisplayString |
string |
A safe display string that can be used for logging and returns "null" when the
underlying object is null.
|