Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

em-ftp-client

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

em-ftp-client

  • 0.0.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

em-ftp-client is a simple EventMachine based FTP Client supporting operations on stream data. The primary interface is EventMachine::FtpClient::Session. A standard usage would look like:

require 'eventmachine'
require 'em-ftp-client'

EM.run do
  EM::FtpClient::Session.new("0.0.0.0", 
    :username => "test", 
    :password => "1234") do |ftp|
    
    ftp.list do |l1|
      puts l1
      puts
      ftp.cwd("files") do
        ftp.list do |l2|
          puts l2
          puts
          ftp.put("one.txt") do
            ftp.stream {|d| puts "STREAMING: #{d.inspect}" }
            ftp.get("two.txt") do |t1|
              puts "COMPLETED"
              puts t1
              puts
              EM.stop
            end
          end
        end
      end
    end
  end
end

This library also includes the class SyncSession, which uses fibers and works with em-synchrony.

FAQs

Package last updated on 03 Jul 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc