Summary
Represents a directory path.
- Namespace
- Cake
.Core .IO - Interfaces
-
- IEquatable
<DirectoryPath> - IComparer
<DirectoryPath> - IPath
<DirectoryPath>
- IEquatable
- Base Types
-
- object
- Path
graph BT
Type-->Base0["Path"]
click Base0 "/api/Cake.Core.IO/Path"
Base0-->Base1["object"]
Type-.->Interface0["IEquatable<DirectoryPath>"]
Type-.->Interface1["IComparer<DirectoryPath>"]
Type-.->Interface2["IPath<DirectoryPath>"]
Type["DirectoryPath"]
class Type type-node
Syntax
[TypeConverter(typeof(DirectoryPathConverter))]
public sealed class DirectoryPath : Path, IEquatable<DirectoryPath>, IComparer<DirectoryPath>,
IPath<DirectoryPath>
Attributes
Type | Description |
---|---|
TypeConverter |
Constructors
Name | Summary |
---|---|
DirectoryPath |
Initializes a new instance of the DirectoryPath class.
|
Properties
Name | Value | Summary |
---|---|---|
FullPath | string |
Gets the full path.
Inherited from Path
|
IsRelative | bool |
Gets a value indicating whether or not this path is relative.
Inherited from Path
|
IsUNC | bool |
Gets a value indicating whether or not this path is an UNC path.
Inherited from Path
|
Segments | string[] |
Gets the segments making up the path.
Inherited from Path
|
Separator | char |
Gets the separator this path was normalized with.
Inherited from Path
|
Methods
Name | Value | Summary |
---|---|---|
Collapse |
DirectoryPath |
Collapses a
DirectoryPath containing ellipses.
|
Combine |
DirectoryPath |
Combines the current path with another
DirectoryPath .
The provided DirectoryPath must be relative.
|
CombineWithFilePath |
FilePath | |
Compare |
int |
Compares two DirectoryPath and returns an indication of their relative sort order.
|
Equals |
bool |
Determines whether two
DirectoryPath instances are equal.
|
Equals |
bool |
Determines whether two
DirectoryPath instances are equal.
|
FromString |
DirectoryPath |
Performs a conversion from
string to DirectoryPath .
static
|
GetDirectoryName |
string |
Gets the name of the directory.
|
GetFilePath |
FilePath |
Combines the current path with the file name of a
FilePath .
|
GetHashCode |
int |
Returns the hash code for the
FilePath .
|
GetParent |
DirectoryPath |
Gets the directory path of a
DirectoryPath .
|
GetRelativePath |
DirectoryPath |
Get the relative path to another directory.
|
GetRelativePath |
FilePath |
Get the relative path to another file.
|
MakeAbsolute |
DirectoryPath |
Makes the path absolute to another (absolute) path.
|
MakeAbsolute |
DirectoryPath |
Makes the path absolute (if relative) using the current working directory.
|
ToString |
string |
Returns a
string that represents this path.
Inherited from Path
|
Operators
Name | Value | Summary |
---|---|---|
implicit operator |
DirectoryPath | |
operator != |
bool | |
operator == |
bool |
Extension Methods
Name | Value | Summary |
---|---|---|
Dump |
string |
Get a basic string representation of specified object.
From LoggingExtensions
Requires the Cake.Incubator addin
|
Expand |
DirectoryPath |
Expands all environment variables in the provided
DirectoryPath .
From PathExtensions
|
IsIn |
bool |
Checks if the source is contained in a list
From EnumerableExtensions
Requires the Cake.Incubator addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From Extensions
Requires the Cake.Ftp addin
|
NotNull |
void |
Throws an exception if the specified parameter's value is null.
From IssuesArgumentChecks
Requires the Cake.Issues addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ThrowIfNull |
T |
Throws a
System.ArgumentNullException if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
To |
string |
Returns the string value or a
Not set > markup suitable for Spectre.Console.
From StringExtensions
Requires the Cake.Issues addin
|