View source code
Display the source code in dmd/root/filename.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Struct dmd.root.filename.FileName

Encapsulate path and file names.

struct FileName ;

Methods

NameDescription
absolute Determine if path is absolute.
canonicalName Return canonical version of name in a malloc'd buffer. This code is high risk.
defaultExt Free returned value with FileName::free()
equalsExt Return !=0 if extensions match.
ext Determine file name extension as slice of input.
forceExt Free returned value with FileName::free()
free Free memory allocated by FileName routines
name Return filename name excluding path (read-only).
path Return path portion of str. Path will does not include trailing path separator.
removeExt Return file name without extension.
replaceName Replace filename portion of path.
safeSearchPath Search Path for file in a safe manner.
searchPath Search Path for file.
toAbsolute Return the given name as an absolute path

Authors

Walter Bright, http://www.digitalmars.com

License

Boost License 1.0