Storage/Service/AbstractUrlStorage.php
protected function getPath(string $hash, ?string $cacheContext = null, bool $confirmed = true, string $ds = '/'): string
    {
        $folderName = $this->getBaseUrl();

        if (!$confirmed) {
            $folderName .= $ds . 'uploads';
        }

        //isolate cached files
        if ($cacheContext) {
            $folderName .= $ds . 'cache' . $ds . $cacheContext;
        }

        //in order to avoid a folder with a to big number of files in
        if ($confirmed) {
            $folderName .= $ds . substr($hash, 0, 3);
        }

        //create folder if missing
        if (!file_exists($folderName)) {
            mkdir($folderName, 0777, true);
        }

        return $folderName . $ds . $hash;
    }
protected function getPath(string $hash, ?string $cacheContext = null, bool $confirmed = true, string $ds = '/'): string
    {
        $folderName = $this->getBaseUrl();

        if (!$confirmed) {
            $folderName .= $ds . 'uploads';
        }

        //isolate cached files
        if ($cacheContext) {
            $folderName .= $ds . 'cache' . $ds . $cacheContext;
        }

        //in order to avoid a folder with a to big number of files in
        if ($confirmed) {
            $folderName .= $ds . substr($hash, 0, 3);
        }

        //create folder if missing
        if (!file_exists($folderName)) {
            mkdir($folderName, 0777, true);
        }

        return $folderName . $ds . $hash;
    }
protected function getPath ( string $ hash , ? string $ cacheContext = null , bool $ confirmed = true , string $ ds = '/' ) : string { $ folderName = $ this -> getBaseUrl ( ) ; if ( ! $ confirmed ) { $ folderName .= $ ds . 'uploads' ; } //isolate cached files if ( $ cacheContext ) { $ folderName .= $ ds . 'cache' . $ ds . $ cacheContext ; } //in order to avoid a folder with a to big number of files in if ( $ confirmed ) { $ folderName .= $ ds . substr ( $ hash , 0 , 3 ) ; } //create folder if missing if ( ! file_exists ( $ folderName ) ) { mkdir ( $ folderName , 0777 , true ) ; } return $ folderName . $ ds . $ hash ; }
returns the a file path or a resource url that can be handled by file function such as fopen
returns the a file path or a resource url that can be handled by file function such as fopen