mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
* createDirs(path): if path already exists, make sure it's a
directory. * Provide a C++ wrapper around lstat().
This commit is contained in:
parent
d7ca6f44eb
commit
100becf8d1
2 changed files with 26 additions and 20 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue