source/Application/Model/File.php
public function isUnderDownloadFolder()
    {
        $storageLocation = realpath($this->getStoreLocation());

        if ($storageLocation === false) {
            return false;
        }

        $downloadFolder = realpath($this->_getBaseDownloadDirPath());

        return strpos($storageLocation, $downloadFolder) !== false;
    }
public function isUnderDownloadFolder()
    {
        $storageLocation = realpath($this->getStoreLocation());

        if ($storageLocation === false) {
            return false;
        }

        $downloadFolder = realpath($this->_getBaseDownloadDirPath());

        return strpos($storageLocation, $downloadFolder) !== false;
    }
public function isUnderDownloadFolder ( ) { $ storageLocation = realpath ( $ this -> getStoreLocation ( ) ) ; if ( $ storageLocation === false ) { return false ; } $ downloadFolder = realpath ( $ this -> _getBaseDownloadDirPath ( ) ) ; return strpos ( $ storageLocation , $ downloadFolder ) !== false ; }
Return true if file is under download folder.
Return false if file is above download folder or if file does not exist.

@return bool
Return true if file is under download folder . Return false if file is above download folder or if file does not exist .