Module: RIO::Ops::File::Existing
Instance Method Summary
collapse
#album, #artist, #mp3info, #mp3length, #time, #title, #vbr, #year
#|
#>, #>>, #copy_as_file?, #spcp
#cpclose, #cpclose0
#<, #<<
#basename=, #chmod, #chown, #dirname=, #extname=, #filename=, #mountpoint?, #must_exist, #realpath, #rename, #rename!, #ss_type?
Instance Method Details
87
|
# File 'lib/rio/ops/file.rb', line 87
def clear() truncate(0) end
|
#empty? ⇒ Boolean
75
76
77
|
# File 'lib/rio/ops/file.rb', line 75
def empty?()
self.selective? ? self.to_a.empty? : self.size == 0
end
|
#rm(*args) ⇒ Object
Also known as:
delete, delete!
78
79
80
81
82
|
# File 'lib/rio/ops/file.rb', line 78
def rm(*args)
rtn_reset {
fs.rm(self,*args)
}
end
|
#selective? ⇒ Boolean
72
73
74
|
# File 'lib/rio/ops/file.rb', line 72
def selective?
%w[stream_sel stream_nosel].any? { |k| cx.has_key?(k) }
end
|
#touch(*args) ⇒ Object
85
|
# File 'lib/rio/ops/file.rb', line 85
def touch(*args) rtn_self { fs.touch(self.to_s,*args) } end
|
#truncate(sz = 0) ⇒ Object
86
|
# File 'lib/rio/ops/file.rb', line 86
def truncate(sz=0) rtn_reset { fs.truncate(self.to_s,sz) } end
|