File modification time: Difference between revisions

Content added Content deleted
(Omitted EasyLang)
(Add lang example)
Line 795: Line 795:
}
}
}</syntaxhighlight>
}</syntaxhighlight>

=={{header|Lang}}==
{{libheader|lang-io-module}}
<syntaxhighlight lang="lang">
# Load the IO module
# Replace "<pathToIO.lm>" with the location where the io.lm lang module was installed to without "<" and ">"
ln.loadModule(<pathToIO.lm>)

$file = [[io]]::fp.openFile(input.txt)

$modTime = [[io]]::fp.getModificationDate($file)
fn.println(Mod Time: $modTime)

[[io]]::fp.setModificationDate($file, fn.currentTimeMillis())

$modTime = [[io]]::fp.getModificationDate($file)
fn.println(Mod Time now: $modTime)

[[io]]::fp.closeFile($file)
</syntaxhighlight>


=={{header|Lasso}}==
=={{header|Lasso}}==