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
Returns a new instance of SBucketDir.
131
132
133
134
|
# File 'lib/s3fsr.rb', line 131
def initialize(parent, bucket_name)
@parent = parent @bucket_name = bucket_name
end
|
Instance Method Details
#bucket ⇒ Object
140
141
142
|
# File 'lib/s3fsr.rb', line 140
def bucket
@bucket_name
end
|
#delete ⇒ Object
135
136
137
138
139
|
# File 'lib/s3fsr.rb', line 135
def delete
raise "cannot delete bucket dir #{name}" if @parent == nil
AWS::S3::Bucket.delete name
@parent.content_deleted name
end
|
#name ⇒ Object
143
144
145
|
# File 'lib/s3fsr.rb', line 143
def name
@bucket_name
end
|
#path_to_key(child_key) ⇒ Object
146
147
148
|
# File 'lib/s3fsr.rb', line 146
def path_to_key child_key
child_key
end
|