the name of the file to check
FileException if the given file does not exist.
import std.datetime : abs, DateTime, hnsecs, SysTime; scope(exit) deleteme.remove; import std.datetime : Clock, seconds; auto currTime = Clock.currTime(); enum leeway = 5.seconds; deleteme.write("bb"); assert(abs(deleteme.timeLastModified - currTime) <= leeway);
Returns the time that the given file was last modified.