FileName

Encapsulate path and file names.

Members

Functions

equalsExt
bool equalsExt(const(char)* ext)

Return !=0 if extensions match.

Static functions

absolute
bool absolute(const(char)* name)

Determine if path is absolute.

canonicalName
const(char)* canonicalName(const(char)* name)

Return canonical version of name in a malloc'd buffer. This code is high risk.

defaultExt
const(char)* defaultExt(const(char)* name, const(char)* ext)

Free returned value with FileName::free()

ext
const(char)* ext(const(char)* str)

Determine file name extension as slice of input.

forceExt
const(char)* forceExt(const(char)* name, const(char)* ext)

Free returned value with FileName::free()

free
void free(const(char)* str)

Free memory allocated by FileName routines

name
const(char)* name(const(char)* str)

Return filename name excluding path (read-only).

path
const(char)* path(const(char)* str)

Return path portion of str. Path will does not include trailing path separator.

removeExt
const(char)* removeExt(const(char)* str)

Return file name without extension.

replaceName
const(char)* replaceName(const(char)* path, const(char)* name)

Replace filename portion of path.

safeSearchPath
const(char)* safeSearchPath(Strings* path, const(char)* name)

Search Path for file in a safe manner.

searchPath
const(char)* searchPath(Strings* path, const(char)* name, bool cwd)

Search Path for file. Input: cwd if true, search current directory before searching path

Meta