Method: FakeS3::FileStore#delete_objects
- Defined in:
- lib/fakes3/file_store.rb
#delete_objects(bucket, objects, request) ⇒ Object
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/fakes3/file_store.rb', line 272 def delete_objects(bucket, objects, request) begin filenames = [] objects.each do |object_name| filenames << File.join(@root,bucket.name,object_name) object = bucket.find(object_name) bucket.remove(object) end FileUtils.rm_rf(filenames) rescue puts $! $!.backtrace.each { |line| puts line } return nil end end |