Class: SFakeDir

Inherits:
SBaseDir show all
Defined in:
lib/s3fsr.rb

Instance Method Summary collapse

Methods inherited from SBaseDir

#can_write_files?, #content_deleted, #contents, #create_dir, #create_file, #delete, #get, #is_directory?, #is_file?, #size, #touch

Constructor Details

#initialize(parent, key) ⇒ SFakeDir

Returns a new instance of SFakeDir.



110
111
112
113
114
# File 'lib/s3fsr.rb', line 110

def initialize(parent, key)
  @parent = parent
  @key = key
  @data = nil
end

Instance Method Details

#bucketObject



118
119
120
# File 'lib/s3fsr.rb', line 118

def bucket
  @parent.bucket
end

#nameObject



115
116
117
# File 'lib/s3fsr.rb', line 115

def name
  strip_dir_suffix @key.split('/')[-1]
end