Returns the default path to persist sessions.

@param string $toAppend A relative path to append to the session save path

@return string The default path to persist session
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;
    }
864350
public function app_path($path = null)
    {
        return empty($path) ? $this->base_path() . DIRECTORY_SEPARATOR . 'app' : $this->base_path() . 'app' . $path;
    }
360473
public function dir(string $type, string $append = ''): string
    {
        return $this->_dir($type, $append);
    }
946796
public function getUploadTo($path = '')
    {
        if (isset($this->options['upload_to'])) return $this->options['upload_to'];

        return public_path($this->addSlashes(self::DEFAULT_UPLOAD_TO)) . $path;
    }
1216624
public function getConfigurationPath($name = null)
    {
        if (! $name) {
            $appConfigDir = base_path('config') . '/';

            if (file_exists($appConfigDir)) {
                return $appConfigDir;
            } elseif (file_exists($path = __DIR__ . '/../config/')) {
                return $path;
            }
        } else {
            $appConfigPath = base_path('config') . '/' . $name . '.php';

            if (file_exists($appConfigPath)) {
                return $appConfigPath;
            } elseif (file_exists($path = __DIR__ . '/../config/' . $name . '.php')) {
                return $path;
            }
        }

        return '';
    }
765174
public static function getTravelPath($from, $to)
    {
        $from = explode(DS, $from);
        $to = explode(DS, $to);

        $relPath = $to;

        foreach ($from as $depth => $dir) {
            // find first non-matching dir
            if ($dir === $to[$depth]) {
                // ignore this directory
                array_shift($relPath);
            } else {
                // get number of remaining dirs to $from
                $remaining = count($from) - ($depth - 1);
                if ($remaining > 1) {
                    // add traversals up to first matching dir
                    $padLength = (count($relPath) + $remaining - 1) * -1;
                    $relPath = array_pad($relPath, $padLength, '..');
                    break;
                } else {
                    $relPath[0] = './'.$relPath[0];
                }
            }
        }

        return implode('/', $relPath);
    }
1331137
public static function sessionSavePath($path = null)
    {
        if (PHP_SAPI != 'cli') {
            return $path ? session_save_path($path) : session_save_path();
        }
        if ($path && is_dir($path) && is_writable($path) && !static::sessionStarted()) {
            HttpCache::$sessionPath = $path;
        }
        return HttpCache::$sessionPath;
    }
600935
public function getLogDir($relativePathToAppend = '')
    {
        return $this->realpath(
            $this->makePathAbsolute(
                $this->getSystemConfiguration()->getParam(DirectoryKeys::VAR_LOG) . $this->makePathAbsolute($relativePathToAppend)
            )
        );
    }
280320
private function getAppConfig($apps)
    {
        $pathinfo = trim($this->env->getPathinfo(), '/');
        $pathinfos = explode('/', $pathinfo);
        $group = isset($pathinfos[0]) ? $pathinfos[0] : '';
        $_apps = null;
        if (isset($apps[$group])) {
            $_apps = $apps[$group];
            array_shift($pathinfos);
            $this->env->setPathinfo(implode('/', $pathinfos));
        } elseif (isset($apps['vitex.default'])) {
            $_apps = $apps['vitex.default'];
        }
        return $_apps;
    }
742229
public function getDataFixturesDirectoryPath(): ?string
    {
        $path = $this->getPath();

        if (empty($path)) {
            return null;
        }

        return Miscellaneous::concatenatePaths([
            $path,
            static::PATH_DATA_FIXTURES,
        ]);
    }
788303
public function GetAppRoot () {
		if ($this->appRoot === NULL) {
			// `ucfirst()` - cause IIS has lower case drive name here - different from __DIR__ value
			$indexFilePath = ucfirst(str_replace(['\\', '//'], '/', $this->globalServer['SCRIPT_FILENAME']));
			$this->appRoot = strpos(__FILE__, 'phar://') === 0
				? 'phar://' . $indexFilePath
				: dirname($indexFilePath);
		}
		return $this->appRoot;
	}
738146
private function getAppKey(): string
    {
        $appUUID = $this
            ->getRepositoryReference()
            ->getAppUUID();

        return $appUUID instanceof AppUUID
            ? $appUUID->getId()
            : '';
    }
1310147
public function getStoragePath($path = '')
    {
        //prepend the path with a \/
        if (strlen($path)) {
            $path = '/'.$path;
        }

        $base = $this->_mixer->id;

        //for ownable entities, use the owner component to prefix
        //the path
        if ($this->_mixer->isOwnable()) {
            $path = '/'.$this->_mixer->component.$path;
            $base = $this->_mixer->owner->id;
        }

        return 'n'.$base.$path;
    }
1266770
public function getCachePath() {
        $cachePath= false;
        if (!isset ($this->xpdo->config['cache_path'])) {
            while (true) {
                if (!empty ($_ENV['TMP'])) {
                    if ($cachePath= strtr($_ENV['TMP'], '\\', '/'))
                        break;
                }
                if (!empty ($_ENV['TMPDIR'])) {
                    if ($cachePath= strtr($_ENV['TMPDIR'], '\\', '/'))
                        break;
                }
                if (!empty ($_ENV['TEMP'])) {
                    if ($cachePath= strtr($_ENV['TEMP'], '\\', '/'))
                        break;
                }
                if ($temp_file= @ tempnam(md5(uniqid(rand(), true)), '')) {
                    $cachePath= strtr(dirname($temp_file), '\\', '/');
                    @ unlink($temp_file);
                }
                break;
            }
            if ($cachePath) {
                if ($cachePath{strlen($cachePath) - 1} != '/') $cachePath .= '/';
                $cachePath .= '.xpdo-cache';
            }
        }
        else {
            $cachePath= strtr($this->xpdo->config['cache_path'], '\\', '/');
        }
        if ($cachePath) {
            $perms = $this->getOption('new_folder_permissions', null, $this->getFolderPermissions());
            if (is_string($perms)) $perms = octdec($perms);
            if (@ $this->writeTree($cachePath, $perms)) {
                if ($cachePath{strlen($cachePath) - 1} != '/') $cachePath .= '/';
                if (!is_writeable($cachePath)) {
                    @ chmod($cachePath, $perms);
                }
            } else {
                $cachePath= false;
            }
        }
        return $cachePath;
    }
1114560
public function getSystemTmpDir($relativePathToAppend = '')
    {
        return $this->realpath(
            $this->makePathAbsolute(
                $this->getSystemConfiguration()->getParam(DirectoryKeys::TMP) . $this->makePathAbsolute($relativePathToAppend)
            )
        );
    }
1081474
public function writePreserved() {
        $written = false;
        if (!empty($this->_preserved)) {
            $content = var_export($this->_preserved, true);
            $cacheManager = $this->xpdo->getCacheManager();
            if ($content && $cacheManager) {
                $fileName = $this->path . $this->signature . '/preserved.php';
                $content = "<?php return {$content};";
                if (!($written = $cacheManager->writeFile($fileName, $content))) {
                    $this->xpdo->log(xPDO::LOG_LEVEL_ERROR, 'Error writing preserved objects to ' . $fileName);
                }
            }
        }
        return $written;
    }
525292
private function _ide_path(){
    if ( !self::$dev_path ){
      $this->_set_appui();
      if ( $id = $this->options->from_code(self::IDE_PATH, BBN_APPUI) ){
        self::set_ide_path($id);
      }
    }
    return self::$ide_path;
  }