> --
> You received this message because you are subscribed to the Google Groups
> "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/mongodb-user?hl=en.
>
--
Q1 - not sure what you mean. do you mean removing all files that match a certain query?
--
If you want to delete all files you should just drop the fs.files and fs.chunks collection.
A lot of these operations become pretty clear when looking at the
underlying structure of a GridFS collection, even if there aren't
helper methods designed specifically for each task. In your case you'd
just query the fs.files collection for {"filename": your_filename},
which would return all matching documents. You could then get the _id
of one (or all) of the files with the matching name.