more.path

Undocumented in source.

Members

Functions

normalizePath
char[] normalizePath(char[] path)
Undocumented in source. Be warned that the author may not have intended to support it.
normalizePathLength
size_t normalizePathLength(char[] path)

Normalizes the given path using the following: 1. removes duplicate slashes/backslashes 2. removes '/./' strings 3. replaces 'path/..' strings with 'path' 4. replaces all slashes/backslashes with the dirSeparator 5. removed trailing slashes if not a root directory This function modifies the given string

parentDir
inout(char)[] parentDir(inout(char)[] path)

Returns the parent directory of the given file/directory. If there is no parent directory, it will return an empty string. This function will include the trailing slash only if it is the root directory. Note: This function does not allocate a new string, instead it will return a slice to the given path.

parentDirLength
size_t parentDirLength(inout(char)[] path)

Returns the length of the substring that is the parent directory of the given path. If there is no parent directory, it will return 0. This function will include the trailing slash only if it is the root directory.

rtrimDirSeparators
auto rtrimDirSeparators(inout(char)[] path)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

ParentDirTraverser
struct ParentDirTraverser
Undocumented in source.

Meta