Represents a directory. Not all implementations will support all
available methods and may throw
System.NotSupportedException.
- Namespace
- Statiq
.Common - Interfaces
- Implementing Types
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.
|