Gets the name of the directory or file.
- Namespace
- Statiq
.Common - Containing Type
- NormalizedPath
- Property Type
- string
Syntax
public string Name { get; }
Remarks
If this is passed a file path, it will return the file name.
This is by-and-large equivalent to how DirectoryInfo handles this scenario.
If we wanted to return the *actual* directory name, we'd need to pull in IFileSystem,
and do various checks to make sure things exists.
Value
Type | Description |
---|---|
string | The directory or file name. |