IPath<T> Interface

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) T
Get the relative path to another path.
MakeAbsolute(DirectoryPath) T
Makes the path absolute (if relative) using the specified directory path.
MakeAbsolute(ICakeEnvironment) 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<IPath<T>>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<IPath<T>>(IPath<T>[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<IPath<T>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<IPath<T>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<IPath<T>>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<IPath<T>>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin