driver-legacy/src/main/com/mongodb/gridfs/GridFS.java
public void remove(final ObjectId id) {
        if (id == null) {
            throw new IllegalArgumentException("file id can not be null");
        }

        filesCollection.remove(new BasicDBObject("_id", id));
        chunksCollection.remove(new BasicDBObject("files_id", id));
    }
public void remove(final ObjectId id) {
        if (id == null) {
            throw new IllegalArgumentException("file id can not be null");
        }

        filesCollection.remove(new BasicDBObject("_id", id));
        chunksCollection.remove(new BasicDBObject("files_id", id));
    }
public void remove ( final ObjectId id ) { if ( id == null ) { throw new IllegalArgumentException ( "file id can not be null" ) ; } filesCollection . remove ( new BasicDBObject ( "_id" , id ) ) ; chunksCollection . remove ( new BasicDBObject ( "files_id" , id ) ) ; }
Removes the file matching the given id.

@param id the id of the file to be removed
@throws com.mongodb.MongoException if the operation fails
Removes the file matching the given id .