Method: Unix::Exec#modified_at
- Defined in:
- lib/beaker/host/unix/exec.rb
#modified_at(file, timestamp = nil) ⇒ Object
Update ModifiedDate on a file
126 127 128 129 130 131 |
# File 'lib/beaker/host/unix/exec.rb', line 126 def modified_at(file, = nil) require 'date' time = ? DateTime.parse("#{}") : DateTime.now = time.strftime('%Y%m%d%H%M') execute("/bin/touch -mt #{} #{file}") end |