original_string: public function delete($id)
      {
          $file = $this->collectionWrapper->findFileById($id);
          $this->collectionWrapper->deleteFileAndChunksById($id);
  
          if ($file === null) {
              throw FileNotFoundException::byId($id, $this->getFilesNamespace());
          }
      }
code: public function delete($id)
      {
          $file = $this->collectionWrapper->findFileById($id);
          $this->collectionWrapper->deleteFileAndChunksById($id);
  
          if ($file === null) {
              throw FileNotFoundException::byId($id, $this->getFilesNamespace());
          }
      }
code_tokens: public function delete ( $ id ) { $ file = $ this -> collectionWrapper -> findFileById ( $ id ) ; $ this -> collectionWrapper -> deleteFileAndChunksById ( $ id ) ; if ( $ file === null ) { throw FileNotFoundException :: byId ( $ id , $ this -> getFilesNamespace ( ) ) ; } }
docstring: Delete a file from the GridFS bucket.
  
  If the files collection document is not found, this method will still
  attempt to delete orphaned chunks.
  
  @param mixed $id File ID
  @throws FileNotFoundException if no file could be selected
  @throws DriverRuntimeException for other driver errors (e.g. connection errors)
docstring_tokens: Delete a file from the GridFS bucket .