diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-12-13T13·32+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-12-13T13·32+0000 |
commit | 100becf8d1b95055c73a024f1a2b318690de72f6 (patch) | |
tree | a5c43720894319a22041577155670ed588d9c993 /src/libutil/util.hh | |
parent | d7ca6f44eb506ec315db2ba59216de59de2758b6 (diff) |
* createDirs(path): if path already exists, make sure it's a
directory. * Provide a C++ wrapper around lstat().
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 27ad46904958..f86290f31694 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -4,6 +4,7 @@ #include "types.hh" #include <sys/types.h> +#include <sys/stat.h> #include <dirent.h> #include <unistd.h> #include <signal.h> @@ -42,6 +43,9 @@ Path dirOf(const Path & path); following the final `/'. */ string baseNameOf(const Path & path); +/* Get status of `path'. */ +struct stat lstat(const Path & path); + /* Return true iff the given path exists. */ bool pathExists(const Path & path); |