Skip to content

jrobertson/mymedia_ftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Copying a file to a remote FTP location using the Mymedia_ftp gem

require 'mymedia_ftp'

ftp = MyMediaFTP.new('ftp://james:secretpassword@phone.home:2221')
ftp.ls #=> [{:name=>"notes060820.txt", :type=>:file}] 
ftp.cd 'notes'
ftp.cp '/tmp/notes060920.txt', '.', :outbound
ftp.close

In the above example a file is uploaded to the FTP server.

Notes:

  • By default, all operations are performed on the remote location unless specified by the keyword :outbound.

ftp mymediaftp


Introducing the MyMedia FTP gem

require 'mymedia_ftp'

ftp = MyMediaFTP.new(host: '192.168.4.177', user: 'user', password: '12345')
ftp.mv('/Sounds/Digital/*.wav', '/tmp/audio')
ftp.close

The above example demonstrates files which have a .wav extension within the /Sounds/Digital directory being moved (downloaded) to the local directory /tmp/audio.

Resources

ftp mymediaftp gem

About

A MyMedia FTP client which uses Net/FTP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages