source/Application/Model/File.php
protected function _deleteFile()
    {
        if (!$this->isUploaded()) {
            return false;
        }
        $sHash = $this->oxfiles__oxstorehash->value;
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $iCount = $oDb->getOne(
            'SELECT COUNT(*) FROM `oxfiles` WHERE `OXSTOREHASH` = ' . $oDb->quote($sHash)
        );
        if (!$iCount) {
            $sPath = $this->getStoreLocation();
            unlink($sPath);
        }
    }
protected function _deleteFile()
    {
        if (!$this->isUploaded()) {
            return false;
        }
        $sHash = $this->oxfiles__oxstorehash->value;
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $iCount = $oDb->getOne(
            'SELECT COUNT(*) FROM `oxfiles` WHERE `OXSTOREHASH` = ' . $oDb->quote($sHash)
        );
        if (!$iCount) {
            $sPath = $this->getStoreLocation();
            unlink($sPath);
        }
    }
protected function _deleteFile ( ) { if ( ! $ this -> isUploaded ( ) ) { return false ; } $ sHash = $ this -> oxfiles__oxstorehash -> value ; $ oDb = \ OxidEsales \ Eshop \ Core \ DatabaseProvider :: getDb ( ) ; $ iCount = $ oDb -> getOne ( 'SELECT COUNT(*) FROM `oxfiles` WHERE `OXSTOREHASH` = ' . $ oDb -> quote ( $ sHash ) ) ; if ( ! $ iCount ) { $ sPath = $ this -> getStoreLocation ( ) ; unlink ( $ sPath ) ; } }
Checks if file is not used for  other objects.
If not used, unlink the file.

@return null|false
Checks if file is not used for other objects . If not used unlink the file .