Method: Mac::Exec#modified_at
- Defined in:
- lib/beaker/host/mac/exec.rb
#modified_at(file, timestamp = nil) ⇒ Object
Update ModifiedDate on a file
41 42 43 44 45 46 |
# File 'lib/beaker/host/mac/exec.rb', line 41 def modified_at(file, = nil) require 'date' time = ? DateTime.parse("#{timestamp}") : DateTime.now = time.strftime('%Y%m%d%H%M') execute("touch -mt #{timestamp} #{file}") end |