aboutsummaryrefslogtreecommitdiff
path: root/butl/timestamp
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-18 17:27:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-18 17:27:25 +0200
commitc828e2bb39f711c82c3b816f57ddde9ab29bdb20 (patch)
treeb1d9361660a6fe3f0f4340c35c3699feb066dc75 /butl/timestamp
parent2f6392f4b0c3cc6caffbfac0911dba99f5094887 (diff)
Move path_mtime to filesystem, rename file_mtime, follow symlinks
Diffstat (limited to 'butl/timestamp')
-rw-r--r--butl/timestamp13
1 files changed, 5 insertions, 8 deletions
diff --git a/butl/timestamp b/butl/timestamp
index 76df07b..f397dc6 100644
--- a/butl/timestamp
+++ b/butl/timestamp
@@ -6,7 +6,6 @@
#define BUTL_TIMESTAMP
#include <chrono>
-#include <string>
#include <iosfwd>
#include <butl/path>
@@ -34,21 +33,19 @@ namespace butl
using timestamp = system_clock::time_point;
using duration = system_clock::duration;
+ // Generally-useful special values.
+ //
const timestamp timestamp_unknown {duration {-1}};
const timestamp timestamp_nonexistent {duration {0}};
+ // Human-readable representation. Note that these operators
+ // may throw std::system_error.
+ //
std::ostream&
operator<< (std::ostream&, const timestamp&);
std::ostream&
operator<< (std::ostream&, const duration&);
-
- // Returns timestamp_nonexistent if the entry at the specified path
- // does not exist. All other errors are reported by throwing
- // std::system_error.
- //
- timestamp
- path_mtime (const path&);
};
#endif // BUTL_TIMESTAMP