0.0
No commit activity in last 3 years
No release in over 3 years
A MyMedia FTP client which uses Net/FTP.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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