Does anyone know how to change file modification time with Ruby? I found
how to get last modification time, but dont know how to change it.
Thanks,
David
Does anyone know how to change file modification time with Ruby? I found
how to get last modification time, but dont know how to change it.
Thanks,
David
http://www.ruby-doc.org/core/classes/File.html#M000013
or
http://www.ruby-doc.org/core/classes/FileUtils.html#M001731
– Heikki
RDoc Documentation says
"
touch(list, options = {})
Options: noop verbose
Updates modification time (mtime) and access time (atime) of file(s) in
list. Files are created if they don’t exist.
FileUtils.touch ‘timestamp’
FileUtils.touch Dir.glob(‘*.c’); system ‘make’
[Source]
"
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs