RosettaCodeData/Task/File-modification-time/Sidef/file-modification-time.sidef

7 lines
180 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
var file = File.new(__FILE__);
say file.stat.mtime; # seconds since the epoch
# keep atime unchanged
# set mtime to current time
file.utime(file.stat.atime, Time.now);