void remove ( ) { fs . getFilesCollection ( ) . remove ( new BasicDBObject ( "_id" , id ) ) ; fs . getChunksCollection ( ) . remove ( new BasicDBObject ( "files_id" , id ) ) ; }
Removes file from GridFS i . e . removes documents from files and chunks collections .