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
a local clone.
ddmd.utils
Compiler implementation of the
D programming language.
Utility functions for DMD.
This modules defines some utility functions for DMD.
Authors:
License:
Source: utils.d
- const(char)*
toWinPath(const(char)*src); - Normalize path by turning forward slashes into backslashesParameters:
const(char)* srcSource path, using unix-style ('/') path separators Returns:A newly-allocated string with '/' turned into backslashes - void
readFile(Locloc, File*f); - Reads a file, terminate the program on errorParameters:
Loc locThe line number information from where the call originates File* fa ddmd.root.file.File handle to read - void
writeFile(Locloc, File*f); - Writes a file, terminate the program on errorParameters:
Loc locThe line number information from where the call originates File* fa ddmd.root.file.File handle to write - void
ensurePathToNameExists(Locloc, const(char)*name); - Ensure the root path (the path minus the
name) of the provided path exists, and terminate the process if it doesn't.Parameters:Loc locThe line number information from where the call originates const(char)* namea path to check (the nameis stripped) - void
escapePath(OutBuffer*buf, const(char)*fname); - Takes a path, and escapes '(', ')' and backslashesParameters:
OutBuffer* bufBuffer to write the escaped path to const(char)* fnamePath to escape
Copyright © 1999-2017 by the D Language Foundation | Page generated by
Ddoc on Wed Jul 19 22:16:49 2017