filenameAbsolute

fnstring filenameAbsolute(string path) @trusted

Converts a relative path to an absolute path.

Resolves the path relative to the current working directory.

Parameters

pathRelative path to convert

Returns

The absolute path, or the original path if conversion failed.

Example:

auto abs = filenameAbsolute(".");
assert(abs.length > 0);
assert(abs[0] == '/');