The OpenD Programming Language

timeLastModified

Returns the time that the given file was last modified.

Parameters

name R

the name of the file to check

Return Value

Type: SysTime

Throws

FileException if the given file does not exist.

Examples

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);

Meta