Struct Path

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

struct Path ;

Constructors

NameDescription
this Main constructor.

Properties

NameTypeDescription
empty[get] boolIs this path equal to empty string?
up[get] PathReturns the parent path, according to std.path.dirName.

Methods

NameDescription
opBinary Concatenates two paths, with a directory separator in between.
opBinary Appends an extension to a path. Naturally, a directory separator is NOT inserted in between.
opBinaryRight Concatenates two paths, with a directory separator in between.
opCast Convert to bool
opCmp Compare using OS-specific case-sensitivity rules. If you want to force case-sensitive or case-insensitive, then call filenameCmp instead.
opEquals Compare using OS-specific case-sensitivity rules. If you want to force case-sensitive or case-insensitive, then call filenameCmp instead.
opOpAssign Appends a path to this one, with a directory separator in between.
opOpAssign Appends an extension to this path. Naturally, a directory separator is NOT inserted in between.
raw Returns the underlying string. Does NOT do any escaping, even if path contains spaces.
toString Convert to string, quoting or escaping spaces if necessary.

Aliases

NameDescription
toRawString Returns the underlying string. Does NOT do any escaping, even if path contains spaces.