aboutsummaryrefslogtreecommitdiff
path: root/src/posix_extras.h
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 19:22:26 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2016-02-21 20:38:02 -0500
commit384f7c422acca2f3658393abfc16ea57cd74caa6 (patch)
tree97b225ee9a78141e4c1bedb63ec0e44f9f56f34c /src/posix_extras.h
parent05cafc5002360015a79484e6ee40c159b1c80958 (diff)
Implement utimens
Diffstat (limited to 'src/posix_extras.h')
-rw-r--r--src/posix_extras.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/posix_extras.h b/src/posix_extras.h
index 60b2284..a73f9fe 100644
--- a/src/posix_extras.h
+++ b/src/posix_extras.h
@@ -21,6 +21,7 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <time.h>
namespace scoville {
@@ -81,6 +82,12 @@ class File {
// must indeed be relative (i.e., it must not start with '/').
void UnlinkAt(const char* path) const;
+ // Sets the access and modification times of the file at the path relative to
+ // the file descriptor. The path must indeed be relative (i.e., it must not
+ // start with '/'). Does not follow symbolic links.
+ void UTimeNs(const char* path, const timespec& access,
+ const timespec& modification) const;
+
private:
File() {}