|
MongoGridFS::deleteRemove a file and its chunks from the database Description
public bool|array MongoGridFS::delete
( mixed
$id
)
Parameters
Return Values
Returns an array containing the status of the removal (with respect to the
files collection) if a
write concern is applied.
Otherwise, returns Fields in the status array are described in the documentation for MongoCollection::insert. Errors/ExceptionsThrows MongoCursorException if the "w" option is set and the write fails. Throws MongoCursorTimeoutException if the "w" option is set to a value greater than one and the operation takes longer than MongoCursor::$timeout milliseconds to complete. This does not kill the operation on the server, it is a client-side timeout. The operation in MongoCollection::$wtimeout is milliseconds. |