Method: DO::Server#download
- Defined in:
- lib/do/server.rb
#download(from, to, options = {}) ⇒ Object Also known as: get
Download a file o a directory from a remote location to a local location As for upload we can download an entire directory providing
:recursive => true
Examples
download(/tmp/file, /my/file)
get(/tmp/dir, /my, :recursive => true)
144 145 146 147 |
# File 'lib/do/server.rb', line 144 def download(from, to, ={}) log "download from '%s' to '%s'" % [from, to] sftp.download!(from, to) end |