Module: RIO::Cp::File::Input
Instance Method Summary collapse
- #>(arg) ⇒ Object (also: #copy_to)
- #>>(arg) ⇒ Object (also: #append_to)
- #copy_as_file?(arg) ⇒ Boolean
- #spcp(arg) ⇒ Object
Methods included from Util::InOut
Instance Method Details
#>(arg) ⇒ Object Also known as: copy_to
223 224 225 |
# File 'lib/rio/cp.rb', line 223 def >(arg) spcp(arg) || cpclose(arg) { self.iostate(:>) > arg } end |
#>>(arg) ⇒ Object Also known as: append_to
226 227 228 |
# File 'lib/rio/cp.rb', line 226 def >>(arg) spcp(arg) || cpclose(arg) { self.iostate(:>>) >> arg } end |
#copy_as_file?(arg) ⇒ Boolean
231 232 233 |
# File 'lib/rio/cp.rb', line 231 def copy_as_file?(arg) arg.kind_of?(Rio) and arg.scheme == 'ftp' end |
#spcp(arg) ⇒ Object
234 235 236 237 238 239 240 241 |
# File 'lib/rio/cp.rb', line 234 def spcp(arg) if arg.kind_of?(Rio) and arg.scheme == 'ftp' arg.copy_from(new_rio(rl.path)) self else nil end end |