Class: SBucketDir
Instance Method Summary
collapse
Methods inherited from SBaseDir
#can_write_files?, #content_deleted, #contents, #create_dir, #create_file, #get, #is_directory?, #is_file?, #size, #touch
Constructor Details
#initialize(parent, bucket_name) ⇒ SBucketDir
183
184
185
186
|
# File 'lib/s3fsr.rb', line 183
def initialize(parent, bucket_name)
@parent = parent @bucket_name = bucket_name
end
|
Instance Method Details
#bucket ⇒ Object
192
193
194
|
# File 'lib/s3fsr.rb', line 192
def bucket
@bucket_name
end
|
#delete ⇒ Object
187
188
189
190
191
|
# File 'lib/s3fsr.rb', line 187
def delete
raise "cannot delete bucket dir #{name}" if @parent == nil
AWS::S3::Bucket.delete name
@parent.content_deleted name
end
|
#name ⇒ Object
195
196
197
|
# File 'lib/s3fsr.rb', line 195
def name
@bucket_name
end
|
#path_to_key(child_key) ⇒ Object
198
199
200
|
# File 'lib/s3fsr.rb', line 198
def path_to_key child_key
child_key
end
|