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

7 lines
180 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01: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);