Phalcon\Db\Adapter\MongoDB\GridFS\Bucket::delete PHP Method

delete() public method

If the files collection document is not found, this method will still attempt to delete orphaned chunks.
public delete ( mixed $id )
$id mixed File ID
    public function delete($id)
    {
        $file = $this->collectionWrapper->findFileById($id);
        $this->collectionWrapper->deleteFileAndChunksById($id);
        if ($file === null) {
            throw FileNotFoundException::byId($id, $this->getFilesNamespace());
        }
    }