Skip to content

ericmathison/ftp_transfer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

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