Path Class

Summary

Provides properties and instance methods for working with paths. This class must be inherited.
Namespace
Cake.Core.IO
Base Types
  • object
Derived Types
graph BT Type-->Base0["object"] Type["Path"] class Type type-node Derived0["FilePath"]-->Type click Derived0 "/api/Cake.Core.IO/FilePath" Derived1["DirectoryPath"]-->Type click Derived1 "/api/Cake.Core.IO/DirectoryPath"

Syntax

public abstract class Path

Constructors

Name Summary
Path(string) Initializes a new instance of the Path class.

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
ToString() string
Returns a string that represents this path.

Extension Methods

Name Value Summary
Dump<Path>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<Path>(Path[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<Path>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
NotNull<Path>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<Path>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<Path>(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
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin