Class: Ftps

Inherits:
Object
  • Object
show all
Defined in:
lib/wormholio/ftps.rb

Class Method Summary collapse

Class Method Details

.download(creds, local_path, filename, options = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/wormholio/ftps.rb', line 13

def self.download(creds,local_path,filename,options={})
  p 'FTPS DOWNLOAD'
  connect(creds,options)
  @wormholio_ftps.chdir("#{creds['dir_path']}")
  @wormholio_ftps.getbinaryfile(filename,"#{local_path}#{filename}")
  close_connection()
end

.upload(creds, file, options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/wormholio/ftps.rb', line 5

def self.upload(creds,file,options={})
  p 'FTPS UPLOAD'
  connect(creds,options)
  @wormholio_ftps.chdir("#{creds['dir_path']}")
  @wormholio_ftps.putbinaryfile(file)
  close_connection()
end