aboutsummaryrefslogtreecommitdiff
path: root/build2/filesystem.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/filesystem.cxx')
-rw-r--r--build2/filesystem.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/build2/filesystem.cxx b/build2/filesystem.cxx
index 97f540b..5e6df5f 100644
--- a/build2/filesystem.cxx
+++ b/build2/filesystem.cxx
@@ -27,6 +27,20 @@ namespace build2
}
}
+ timestamp
+ mtime (const char* p)
+ {
+ try
+ {
+ return file_mtime (p);
+ }
+ catch (const system_error& e)
+ {
+ fail << "unable to obtain file " << p << " modification time: " << e
+ << endf;
+ }
+ }
+
fs_status<mkdir_status>
mkdir (const dir_path& d, uint16_t v)
{