#NEWLINE# def delete( self , file_id ) : #NEWLINE# #INDENT# 'Delete a file from GridFS by ``"_id"``.\n\n        Deletes all data belonging to the file with ``"_id"``:\n        `file_id`.\n\n        .. warning:: Any processes/threads reading from the file while\n           this method is executing will likely see an invalid/corrupt\n           file. Care should be taken to avoid concurrent reads to a file\n           while it is being deleted.\n\n        .. note:: Deletes of non-existent files are considered successful\n           since the end result is the same: no file with that _id remains.\n\n        :Parameters:\n          - `file_id`: ``"_id"`` of the file to delete\n\n        .. versionchanged:: 3.1\n           ``delete`` no longer ensures indexes.\n        ' #NEWLINE# self . __files . delete_one ( { #NEWLINE# #INDENT# '_id' : file_id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . __chunks . delete_many ( { #NEWLINE# #INDENT# 'files_id' : file_id , #NEWLINE# #UNINDENT# } )