Path

Represents a filesystem path. The path is always kept normalized automatically (as performed by buildNormalizedPathFixed).

wchar and dchar versions not yet supported, blocked by DMD issue #12112

Constructors

this
this(const(C)[] path)

Main constructor.

this
this(T[] path)

Convert from one type of Path to another.

Members

Functions

opBinary
Path!C opBinary(Path!C rhs)
Path!C opBinary(const(C)[] rhs)

Concatenates two paths, with a directory separator in between.

opBinary
Path!C opBinary(Ext!C rhs)

Appends an extension to a path. Naturally, a directory separator is NOT inserted in between.

opBinaryRight
Path!C opBinaryRight(const(C)[] lhs)

Concatenates two paths, with a directory separator in between.

opCmp
int opCmp(Path!C other)
int opCmp(string other)

Compare using OS-specific case-sensitivity rules. If you want to force case-sensitive or case-insensistive, then call filenameCmp instead.

opEquals
int opEquals(Path!C other)
int opEquals(string other)

Compare using OS-specific case-sensitivity rules. If you want to force case-sensitive or case-insensistive, then call filenameCmp instead.

opOpAssign
Path!C opOpAssign(Path!C rhs)
Path!C opOpAssign(const(C)[] rhs)

Appends a path to this one, with a directory separator in between.

opOpAssign
Path!C opOpAssign(Ext!C rhs)

Appends an extension to this path. Naturally, a directory separator is NOT inserted in between.

toRawString
immutable(C)[] toRawString()

Convert to string, wstring or dstring, depending on the type of Path. Does NOT do any escaping, even if path contains spaces.

toString
string toString()

Convert to string, quoting or escaping spaces if necessary.

Properties

empty
bool empty [@property getter]

Is this path equal to empty string?

up
Path!C up [@property getter]

Returns the parent path, according to std.path.dirName.

Meta