MCPcopy Create free account
hub / github.com/DFHack/dfhack / mtime

Method mtime

library/modules/Filesystem.cpp:184–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184std::time_t Filesystem::mtime (std::filesystem::path path) noexcept
185{
186 try
187 {
188 auto ftime = std::filesystem::last_write_time(path);
189 auto t = ftime.time_since_epoch().count();
190 return t;
191 }
192 catch (std::filesystem::filesystem_error&)
193 {
194 return -1;
195 }
196}
197
198int Filesystem::listdir (std::filesystem::path dir, std::vector<std::filesystem::path > &files) noexcept
199{

Callers

nothing calls this directly

Calls 1

countMethod · 0.45

Tested by

no test coverage detected