(PECL mongo >=0.9.0)
MongoGridFS::remove — Remove files and their chunks from the database
$criteria = array()
   [, array $options = array()
  ]] )
criteria
     The filename or criteria for which to search.
options
     An array of options for the remove operations executed against the chunks and files collections. See MongoCollection::remove() for documentation on these options.
   Returns an array containing the status of the removal (with respect to the
   files collection) if the "w" option is
   set. Otherwise, returns TRUE.
  
Fields in the status array are described in the documentation for MongoCollection::insert().
Исключение MongoCursorException бросается, если установлена опция "w" и не прошла запись.
Исключение MongoCursorTimeoutException бросается, если опция "w" установлена в значение больше одного и операция заняла больше, чем MongoCursor::$timeout миллисекунд. При этом операция на сервере не прерывается, так как это ограничение времени работает на клиентской стороне. Операция в миллисекундах в MongoCollection::$wtimeout.