RosettaCodeData/Task/File-modification-time/Standard-ML/file-modification-time.ml
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

6 lines
323 B
Standard ML

val mtime = OS.FileSys.modTime filename; (* returns a Time.time data structure *)
(* unfortunately it seems like you have to set modification & access times together *)
OS.FileSys.setTime (filename, NONE); (* sets modification & access time to now *)
(* equivalent to: *)
OS.FileSys.setTime (filename, SOME (Time.now ()))