Skip to content

ericmathison/ftp_transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ftp_transfer

Handles tranfering many files at once over FTP using a higher level api than net/ftp from the standard library.

#upload

require 'ftp_transfer'
FtpTransfer.new(
  host: 'foobar.bazquux.com',
  user: 'user',
  pass: 'password',
  local_dir: '~/files-to-send').upload('file-upload-dir')

#download

FtpTransfer.new(
  host: 'foobar.bazquux.com',
  user: 'user',
  pass: 'password',
  local_dir: '~/received-files').download('file-download-dir')

Optional Settings (Examples):

port: 21212 # defaults to 21
pattern: '*.jpg'

Only applies for uploads:

archive_dir: '~/archived-files'

The pattern option will default to '*' when not specified.

Specifying the archive directory option keeps a copy of the transferred files locally in the given directory. There is not currently an archive option for the download method (Pull requests welcome!).

About

A bulk FTP transfer library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages