Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

goodanthony/iam_ftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iam::Ftp

Thanks to Ruby’s 'net/ftp' library this gem would come in handy if you want to upload files or directories to a remote server with FTP.

Installation

gem install iam_ftp

Usage

require 'iam_ftp'

to initialize

connect = IamFtp::FtpCalls.new({:ftp_host => "ftp.iamfree.com", :ftp_username => "me@iamfree.com", :ftp_password => "i dont know"})

To upload an entire directory to server FTP

connect.upload_directory_to_ftp_server("/Users/me/Documents/work/iamnotfree/my-site/", "/home/www/")

If the server is a shared host like Godaddy.com hosting: leave second parameter blank

connect.upload_directory_to_ftp_server("/Users/me/Documents/work/iamnotfree/my-site/", "")

To upload a file one by one(firsly the directory, then the remote directory, then the file name)

connect.upload_file_to_ftp_server("/Users/me/Documents/work/iamnotfree/my-site", "", "/Users/me/Documents/work/iamnotfree/my-site/messages.html")

If it is too hard to type the file path. Just locate the file in "finder" and drag it to your terminal. That would get your file path on to the terminal.

To list all the files in your FTP server

connect.list_all_files

Contributing

  1. Fork it ( https://github.com/iamfree-com/iam_ftp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A Ruby FTP client and it would upload files to an FTP server, list all files and download files from FTP server

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published