diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-07T09·25+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-07T09·25+0000 |
commit | 5895c160c466c0a97716ffdf5ef654eb1c3c6009 (patch) | |
tree | 8e2756dd75b785f550c00538e4b97570d6a4c1c6 /src/util.hh | |
parent | 609a224848dd08cea35a89b03b64274c82f0a2a7 (diff) |
* Make dbRefs a mapping from Hash to [Path].
Diffstat (limited to 'src/util.hh')
-rw-r--r-- | src/util.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.hh b/src/util.hh index 6242fcb112ae..a8f801b30c5d 100644 --- a/src/util.hh +++ b/src/util.hh @@ -21,6 +21,7 @@ public: Error(const format & f); ~Error() throw () { }; const char * what() const throw () { return err.c_str(); } + const string & msg() const throw () { return err; } }; class SysError : public Error @@ -44,9 +45,13 @@ extern string thisSystem; /* Return an absolutized path, resolving paths relative to the - specified directory, or the current directory otherwise. */ + specified directory, or the current directory otherwise. The path + is also canonicalised. */ string absPath(string path, string dir = ""); +/* Canonicalise a path (as in realpath(3)). */ +string canonPath(const string & path); + /* Return the directory part of the given path, i.e., everything before the final `/'. */ string dirOf(string path); |