Method: XGen::Mongo::GridFS::GridStore.list

Defined in:
lib/mongo/gridfs/grid_store.rb

.list(db, root_collection = DEFAULT_ROOT_COLLECTION) ⇒ Object

List the contains of all GridFS files stored in the given db and root collection.

:db

the database to use

:root_collection

the root collection to use



102
103
104
105
106
# File 'lib/mongo/gridfs/grid_store.rb', line 102

def list(db, root_collection=DEFAULT_ROOT_COLLECTION)
  db.collection("#{root_collection}.files").find().map { |f|
    f['filename']
  }
end