Guest User

Untitled

a guest
Mar 4th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. require 'net/ftp'
  2.  
  3. @details = {
  4. :host => "caius.name",
  5. :user => "caius",
  6. :pass => "",
  7. :image_path => "websites/caius.name/images/"
  8. }
  9.  
  10.  
  11. @ftp = Net::FTP.new(@details[:host])
  12. @ftp.login(@details[:user], @details[:pass])
  13.  
  14. files = @ftp.chdir(@details[:image_path])
  15. files = @ftp.list('*')
  16.  
  17. p files
Add Comment
Please, Sign In to add comment