Method: Mongo::Grid::FSBucket#drop

Defined in:
lib/mongo/grid/fs_bucket.rb

#drop(opts = {}) ⇒ Object

Drop the collections that implement this bucket.

Since:

  • 2.0.0



493
494
495
496
497
# File 'lib/mongo/grid/fs_bucket.rb', line 493

def drop(opts = {})
  context = Operation::Context.new(operation_timeouts: operation_timeouts(opts))
  files_collection.drop(timeout_ms: context.remaining_timeout_ms)
  chunks_collection.drop(timeout_ms: context.remaining_timeout_ms)
end