May 2018
Intermediate to advanced
328 pages
8h 15m
English
To perform filesystem operations, you should be using the filesystem library. For working with time and duration, you should be using the chrono library. A function that implements the requested functionality has to do the following:
namespace fs = std::experimental::filesystem;namespace ch = std::chrono;template <typename Duration>bool is_older_than(fs::path const & path, Duration const duration){ auto ftimeduration = fs::last_write_time(path).time_since_epoch(); auto nowduration ...Read now
Unlock full access