Coder Social home page Coder Social logo

ftp_sync's Introduction

FtpSync

A Ruby library for recursively downloading and uploading directories to/from ftp servers. Also supports uploading and downloading a list of files relative to the local/remote roots. You can specify a timestamp to only download files newer than that timestamp, or only download files newer than their local copy.

This was originally written to provide the functionality I needed for Munkey, a tool for tracking changes on FTP servers with git.

Allows you to supply a ‘ignore’ class that dictates whether a file is excluded from upload / download.

Quickstart

ftp = FtpSync.new 'my.ftp.server.com', 'username', 'password'
ftp.pull_dir '/tmp/syncdir', 'path/on/server'

make some changes on server

ftp.pull_dir '/tmp/syncdir', 'path/on/server', :since => true, :delete => true

:since => true - means only files which are newer than the local copy will be downloaded
:since => Time.now - means only files which are newer than the supplied date will be downloaded
:delete => true - means if the file is removed from the server, then the local copy is removed
:skip_errors => true - means if file cant be read (ie permissions) it will be skipped

ftp_sync's People

Contributors

jebw avatar orlando avatar seandmccarthy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.