ftp-netrc.rb

Path: lib/net/ftp-netrc.rb
Last Update: Thu Sep 25 07:20:08 +0000 2008

net/ftp-netrc.rb - Net::FTP / Net::Netrc integration

Copyright (c) 2005 Robert J. Showalter

This library is distributed under the terms of the Ruby license. You may freely distribute or modify this library.

This module extends the Net::FTP#login method to use Net::Netrc to lookup login information if a nil username is passed.

Example:

  require 'net/ftp-netrc'     # (brings in net/ftp and net/netrc)

  ftp = Net::FTP.new('myhost')
  ftp.login(nil)
  ftp.last_response
  => 230 User myuser logged in.

$Id: ftp-netrc.rb 40 2005-12-19 16:53:01Z bshow $

Required files

net/ftp   net/netrc  

[Validate]