Module: MyCore::File::ClassMethods
- Defined in:
- lib/my_core/file.rb
Instance Method Summary collapse
- #creation_time(file) ⇒ Object
-
#string_to_file(string, file) ⇒ Object
Writes string to file.
-
#to_string(file) ⇒ Object
Converts file to string.
Instance Method Details
#creation_time(file) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/my_core/file.rb', line 15 def creation_time(file) require 'open3' require 'time' Time.parse( Open3.popen3("mdls", "-name","kMDItemContentCreationDate", "-raw", file)[1].read) end |