Method: FileTransfer::Ftp#download
- Defined in:
- lib/file_transfer/ftp.rb
#download(from_path, to_path) ⇒ String
Downloads data from FTP server
46 47 48 49 50 51 52 53 |
# File 'lib/file_transfer/ftp.rb', line 46 def download(from_path, to_path) from_path = split_path(from_path) open_connection do ftp.chdir from_path[:file_path] ftp.getbinaryfile(to_path, from_path[:file_name]) "#{from_path[:file_path]}/#{from_path[:file_name]}" end end |