diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-21 20:32:29 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2016-02-21 20:38:12 -0500 |
commit | fa0cb2cf4e0b52e57f50b2b8cc25228d481abc31 (patch) | |
tree | 9f1945429ff6ca0c4168b6c6d9c24577addfbafa /src/posix_extras.h | |
parent | 4f9c17ee5044c68a358a92e90772eea5b3966e3c (diff) |
Implement chmod
Diffstat (limited to 'src/posix_extras.h')
-rw-r--r-- | src/posix_extras.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/posix_extras.h b/src/posix_extras.h index b9e9da6..2976016 100644 --- a/src/posix_extras.h +++ b/src/posix_extras.h @@ -65,6 +65,10 @@ class File { // Calls fstat(2) on the file descriptor. struct stat Stat() const; + // Changes the file mode of the path relative to the file descriptor. The + // path must indeed be relative (i.e., it must not start with '/'). + void ChModAt(const char* path, mode_t) const; + // Calls lstat(2) on the path relative to the file descriptor. The path must // indeed be relative (i.e., it must not start with '/'). struct stat LinkStatAt(const char* path) const; |