FileName

Members

Functions

equalsExt
bool equalsExt(const(char)* ext)

Return !=0 if extensions match.

Static functions

absolute
bool absolute(const(char)* name)

Return !=0 if absolute path name.

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)

Return filename extension (read-only). Points past '.' of extension. If there isn't one, return NULL.

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 mem.xmalloc'd filename with extension removed.

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