Module: RIO::Ops::File::NonExisting
- Includes:
- ExistOrNot, RIO::Ops::FileOrDir::NonExisting
- Included in:
- File::NonExisting
- Defined in:
- lib/rio/ops/file.rb
Instance Method Summary collapse
- #delete(*args) ⇒ Object (also: #rm, #unlink, #delete!)
- #touch(*args) ⇒ Object
- #truncate(sz = 0) ⇒ Object
Methods included from RIO::Ops::FileOrDir::NonExisting
Instance Method Details
#delete(*args) ⇒ Object Also known as: rm, unlink, delete!
65 |
# File 'lib/rio/ops/file.rb', line 65 def delete(*args) rtn_self { ; } end |
#touch(*args) ⇒ Object
69 70 71 72 73 74 75 76 |
# File 'lib/rio/ops/file.rb', line 69 def touch(*args) rtn_reset { ::File.open(self.to_s, 'a') { ; } } end |
#truncate(sz = 0) ⇒ Object
77 |
# File 'lib/rio/ops/file.rb', line 77 def truncate(sz=0) self.touch.truncate(sz) end |