Summary
Represents a path.
- Namespace
- Cake
.Core .IO - Implementing Types
graph BT
Type["IPath<T>"]
class Type type-node
Implementing0["FilePath"]-.->Type
click Implementing0 "/api/Cake.Core.IO/FilePath"
Implementing1["DirectoryPath"]-.->Type
click Implementing1 "/api/Cake.Core.IO/DirectoryPath"
Syntax
public interface IPath<T>
Type Parameters
Name | Description |
---|---|
T | The path type. |
Properties
Name | Value | Summary |
---|---|---|
FullPath | string |
Gets the full path.
|
IsRelative | bool |
Gets a value indicating whether or not this path is relative.
|
IsUNC | bool |
Gets a value indicating whether or not this path is an UNC path.
|
Segments | string[] |
Gets the segments making up the path.
|
Separator | char |
Gets the separator this path was normalized with.
|
Methods
Name | Value | Summary |
---|---|---|
Collapse |
T |
Collapses a path containing ellipses.
|
GetRelativePath |
T |
Get the relative path to another path.
|
MakeAbsolute |
T |
Makes the path absolute (if relative) using the specified directory path.
|
MakeAbsolute |
T |
Makes the {T} path absolute (if relative) using the current working directory.
|
ToString |
string |
Returns a
string that represents this path.
|
Extension Methods
Name | Value | Summary |
---|---|---|
Dump |
string |
Get a basic string representation of specified object.
From LoggingExtensions
Requires the Cake.Incubator addin
|
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
|