Method: FakeS3::FileStore#delete_bucket

Defined in:
lib/fakes3/file_store.rb

#delete_bucket(bucket_name) ⇒ Object

Raises:



73
74
75
76
77
78
79
# File 'lib/fakes3/file_store.rb', line 73

def delete_bucket(bucket_name)
  bucket = get_bucket(bucket_name)
  raise NoSuchBucket if !bucket
  raise BucketNotEmpty if bucket.objects.count > 0
  FileUtils.rm_r(get_bucket_folder(bucket))
  @bucket_hash.delete(bucket_name)
end