src/Utility/FileUpload.php
public function delete(string $id) : bool
    {
        $query = $this->storageTable->find('all', [
            'conditions' => [self::FILE_STORAGE_FOREIGN_KEY => $id]
        ]);
        $entity = $query->first();

        if (is_null($entity)) {
            return false;
        }

        if ($this->storageTable->delete($entity)) {
            $this->removeThumbnails($entity);

            return true;
        }

        return false;
    }
public function delete(string $id) : bool
    {
        $query = $this->storageTable->find('all', [
            'conditions' => [self::FILE_STORAGE_FOREIGN_KEY => $id]
        ]);
        $entity = $query->first();

        if (is_null($entity)) {
            return false;
        }

        if ($this->storageTable->delete($entity)) {
            $this->removeThumbnails($entity);

            return true;
        }

        return false;
    }
public function delete ( string $ id ) : bool { $ query = $ this -> storageTable -> find ( 'all' , [ 'conditions' => [ self :: FILE_STORAGE_FOREIGN_KEY => $ id ] ] ) ; $ entity = $ query -> first ( ) ; if ( is_null ( $ entity ) ) { return false ; } if ( $ this -> storageTable -> delete ( $ entity ) ) { $ this -> removeThumbnails ( $ entity ) ; return true ; } return false ; }
File delete method.

@param string $id Associated Entity id
@return bool
@todo seems like this code is no longer in use, even though it should, as it handles thumbnails removal.
File delete method .