about summary refs log tree commit diff
path: root/src/util.hh
diff options
context:
space:
mode:
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 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);