Get the path to storage folder with ending slash

@param string $append [optional] append anything you want to application path

@return string
@example /var/www/your.site/com/storage/
192169
public static function getStoragePath(string $append = null): string
    {
        if ($append === null) {
            return static::$storagePath;
        } else {
            return str_replace(DS . DS, DS, static::$storagePath . $append);
        }
    }
942345
public function getVersionAvailable($prepend = '', $append = '') : string
    {
        if ($this->versionFileExists()) {
            $version = $prepend.$this->getVersionFile().$append;
        } else {
            $response = $this->getRepositoryReleases();
            $releaseCollection = collect(\GuzzleHttp\json_decode($response->getBody()));
            $version = $prepend.$releaseCollection->first()->name.$append;
        }

        return $version;
    }
923501
private function getDirectoryPath()
    {
        $path = $this->config['directory'];

        // Create directory if not exists
        if (!is_dir($path)) {
            mkdir($path, 0755, true);
        }

        return $path . DIRECTORY_SEPARATOR;
    }
238532
private function getCachePath()
    {
        if (!$this->files->isDirectory(storage_path("app/modules"))) {
            $this->files->makeDirectory(storage_path("app/modules"));
        }

        $location = str_slug($this->location);

        return storage_path("app/modules/$location.json");
    }
233892
private function getFolder()
    {
        $pathStr = $this->config[ 'savePath' ];
        if (strrchr($pathStr, '/') != '/') {
            $pathStr .= '/';
        }
        $pathStr .= date('Ymd');
        if (!file_exists($pathStr)) {
            if (!mkdir($pathStr, 0777, true)) {
                return false;
            }
        }

        return $pathStr;
    }
548333
public function storagePath($path = '')
    {
        if (defined('THEMOSIS_ROOT')) {
            return $this->rootPath('storage').($path ? DIRECTORY_SEPARATOR.$path : $path);
        }

        return $this->contentPath('storage').($path ? DIRECTORY_SEPARATOR.$path : $path);
    }
46672
protected function _getImagePath($sType)
    {
        $sFolder = array_key_exists($sType, $this->_aTypeToPath) ? $this->_aTypeToPath[$sType] : '0';

        return $this->normalizeDir(\OxidEsales\Eshop\Core\Registry::getConfig()->getPictureDir(false)) . "{$sFolder}/";
    }
1093478
function getScriptPath()
    {
        $fileName = $this->stack->pop();
        if ($this->baseDir) {
            return $this->baseDir . \DIRECTORY_SEPARATOR . $fileName;
        } else {
            return (string)$fileName;
        }
    }
1114352
public function getFullPath()
    {
        if ($this->Filename) {
            return DMS::inst()->getStoragePath() . DIRECTORY_SEPARATOR
                . $this->Folder . DIRECTORY_SEPARATOR . $this->Filename;
        }

        return null;
    }
1205233
public function getPathUrl($path)
    {
        $path = $this->validatePath($path);

        $fullPath = $this->storagePath.implode("/", array_map("rawurlencode", explode("/", $path)));

        return Url::to($fullPath);
    }
1170614
public function getAbsolutePath()
    {
        if ($this->storage->supportsAbsolutePaths()) {
            return $this->storage->getAbsolutePath($this->key);
        }

        return $this->getKey();
    }
1106137
public static function getPublicPath(string $append = null): string
    {
        if ($append === null) {
            return static::$publicPath;
        } else {
            return str_replace(DS . DS, DS, static::$publicPath . $append);
        }
    }
550352
protected function getSessionSavePath($toAppend = null)
    {
        // load the default path
        $sessionSavePath = $this->getSessionSettings()->getSessionSavePath();

        // check if we've something to append
        if ($toAppend != null) {
            $sessionSavePath = $sessionSavePath . DIRECTORY_SEPARATOR . $toAppend;
        }

        // return the session save path
        return $sessionSavePath;
    }
355300
public function compileUrl()
    {
        $append = '';
        if (count($this->compiledValues) > 0) {
            $append = implode('', $this->compiledValues);
        }

        return $this->name.$append;
    }
311112
private function getDirectory()
    {
        // Fallback to default directory if no storage path defined
        if (defined('CRAFT_STORAGE_PATH')) {
            $basePath = CRAFT_STORAGE_PATH;
        } else {
            $basePath = CRAFT_BASE_PATH . DIRECTORY_SEPARATOR . 'storage';
        }

        return $basePath . DIRECTORY_SEPARATOR . 'runtime' . DIRECTORY_SEPARATOR . 'htmlcache' . DIRECTORY_SEPARATOR;
    }
1015599
public static function getBaseDirectory($blnAppendTrailingSlash)
	{
		$path = \FilesModel::findByUuid($GLOBALS['TL_CONFIG']['dmsBaseDirectory'])->path;
		
		if ($blnAppendTrailingSlash)
		{
			$path .= "/";
		}
		return $path;
	}
378351
public static function url_to_file_system( $url ) {
		$url_parts = parse_url($url);
		$url_parts['path'] = apply_filters('timber/URLHelper/url_to_file_system/path', $url_parts['path']);
		$path = ABSPATH.$url_parts['path'];
		$path = str_replace('//', '/', $path);
		return $path;
	}