Class: Etna::Filesystem::SftpFilesystem::SftpFile

Inherits:
Object
  • Object
show all
Defined in:
lib/etna/filesystem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata) ⇒ SftpFile

Returns a new instance of SftpFile.



406
407
408
409
410
411
# File 'lib/etna/filesystem.rb', line 406

def initialize()
  @metadata_parts = .split(" ")
  @size = @metadata_parts[4].to_i
  @perms = @metadata_parts.first
  @name = @metadata_parts[8]
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



404
405
406
# File 'lib/etna/filesystem.rb', line 404

def name
  @name
end

#sizeObject (readonly)

Returns the value of attribute size.



404
405
406
# File 'lib/etna/filesystem.rb', line 404

def size
  @size
end