Table of Contents

Interface IAbsolutePath

Namespace
NDepend.Path
Assembly
NDepend.API.dll

Represents an absolute path to a file or directory on file system.

public interface IAbsolutePath : IPath
Inherited Members
Extension Methods

Properties (7)

DriveLetter

Returns an IDriveLetter object representing the drive of this absolute path.

IDriveLetter DriveLetter { get; }

Property Value

IDriveLetter

Exceptions

InvalidOperationException

is thrown if this absolute path Kind is different than AbsolutePathKind.DriveLetter.

Exists

Gets a value indicating whether the file or directory represented by this absolute path exists.

bool Exists { get; }

Property Value

bool

true if the file or directory represented by this absolute path exists.

IsSupportedByTheCurrentOperatingSystem

Gets a value indicating if the current absolute path is supported by the current operating system.

bool IsSupportedByTheCurrentOperatingSystem { get; }

Property Value

bool

Remarks

When running on Windows, returns true if Kind is DriveLetter or UNC.
When running on Linux or MacOS returns true if Kind is LinuxStyle.
Else returns false.

Kind

Gets the AbsolutePathKind value for this path.

AbsolutePathKind Kind { get; }

Property Value

AbsolutePathKind

ParentDirectoryPath

Returns a new absolute directory path representing the parent directory of this absolute path.

IAbsoluteDirectoryPath ParentDirectoryPath { get; }

Property Value

IAbsoluteDirectoryPath

Remarks

This path nor its parent directory path need to exist for this operation to complete properly.

Exceptions

InvalidOperationException

This absolute path has no parent directory.

UNCServer

Returns the server string if this is a UNC path with syntax '\server\share\path'.

string UNCServer { get; }

Property Value

string

Exceptions

InvalidOperationException

is thrown if this absolute path Kind is different than AbsolutePathKind.UNC.

UNCShare

Returns the share string if this is a UNC path with syntax '\server\share\path'.

string UNCShare { get; }

Property Value

string

Exceptions

InvalidOperationException

is thrown if this absolute path Kind is different than AbsolutePathKind.UNC.

Method (1)

OnSameVolumeThan(IAbsolutePath)

Gets a value indicating whether this absolute path is on the same volume as pathAbsoluteOther.

bool OnSameVolumeThan(IAbsolutePath pathAbsoluteOther)

Parameters

pathAbsoluteOther IAbsolutePath

The other absolute path.

Returns

bool

true if this absolute path is on the same drive as pathAbsoluteOther, else returns false.

Remarks

Being on the same volume means being on the same local/network/shared drive.