about summary refs log tree commit diff
path: root/src/util.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-07T09·25+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-07T09·25+0000
commit5895c160c466c0a97716ffdf5ef654eb1c3c6009 (patch)
tree8e2756dd75b785f550c00538e4b97570d6a4c1c6 /src/util.hh
parent609a224848dd08cea35a89b03b64274c82f0a2a7 (diff)
* Make dbRefs a mapping from Hash to [Path].
Diffstat (limited to 'src/util.hh')
-rw-r--r--src/util.hh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.hh b/src/util.hh
index 6242fcb112..a8f801b30c 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);