Class: BackupOrganizer::FileUtils
- Inherits:
-
Object
- Object
- BackupOrganizer::FileUtils
- Defined in:
- lib/backup_organizer/file_utils.rb
Class Method Summary collapse
- .age_of(path) ⇒ Object
- .mkdir(path) ⇒ Object
- .mtime(path) ⇒ Object
- .mv(from, to) ⇒ Object
- .rm_rf(path) ⇒ Object
- .touch(path) ⇒ Object
Class Method Details
.age_of(path) ⇒ Object
19 20 21 |
# File 'lib/backup_organizer/file_utils.rb', line 19 def self.age_of(path) Time.now - mtime(path) end |
.mkdir(path) ⇒ Object
15 16 17 |
# File 'lib/backup_organizer/file_utils.rb', line 15 def self.mkdir(path) Dir.mkdir(path) end |
.mtime(path) ⇒ Object
23 24 25 |
# File 'lib/backup_organizer/file_utils.rb', line 23 def self.mtime(path) File.mtime(path) end |
.mv(from, to) ⇒ Object
3 4 5 |
# File 'lib/backup_organizer/file_utils.rb', line 3 def self.mv(from, to) ::FileUtils.mv(from, to) end |
.rm_rf(path) ⇒ Object
7 8 9 |
# File 'lib/backup_organizer/file_utils.rb', line 7 def self.rm_rf(path) ::FileUtils.rm_rf(path) end |
.touch(path) ⇒ Object
11 12 13 |
# File 'lib/backup_organizer/file_utils.rb', line 11 def self.touch(path) ::FileUtils.touch(path) end |