Task

Get and set the modification time of a file.




 
every dir := !["./","/"] do {
   if i := stat(f := dir || "input.txt") then {
      write("info for ",f ," mtime= ",ctime(i.mtime),", atime=",ctime(i.ctime), ", atime=",ctime(i.atime)) 
      utime(f,i.atime,i.mtime-1024)
      i := stat(f)
      write("update for ",f ," mtime= ",ctime(i.mtime),", atime=",ctime(i.ctime), ", atime=",ctime(i.atime)) 
      }      
   else stop("failure to stat ",f)
   }