Table of Contents

Interface IPath<TPath>

Namespace
TruePath
Assembly
TruePath.dll

Represents a path in a file system. Allows generic operators to be applied.

public interface IPath<TPath> where TPath : IPath<TPath>

Type Parameters

TPath

The type of this path.

Methods

IsPrefixOf(TPath)

bool IsPrefixOf(TPath other)

Parameters

other TPath

Returns

bool

Remarks

Checks for a non-strict prefix: if the paths are equal then they are still considered prefixes of each other.

StartsWith(TPath)

Determines whether the current path starts with the specified path.

bool StartsWith(TPath other)

Parameters

other TPath

The path to compare to the current path.

Returns

bool

Remarks

Note that currently this comparison is case-sensitive.

Operators

operator /(TPath, string)

Appends another path to this one.

public static abstract TPath operator /(TPath basePath, string appended)

Parameters

basePath TPath
appended string

Returns

TPath

Remarks

Note that in case path appended is absolute, it will completely take over and the basePath will be ignored.

operator /(TPath, LocalPath)

Appends another path to this one.

public static abstract TPath operator /(TPath basePath, LocalPath appended)

Parameters

basePath TPath
appended LocalPath

Returns

TPath

Remarks

Note that in case path appended is absolute, it will completely take over and the basePath will be ignored.