Get absolute path to package base dir.
@return string
191322
public function getBaseDir()
    {
        if (null === $this->baseDir) {
            $this->baseDir = dirname($this->getVendorDir());
        }

        return $this->baseDir;
    }
278756
public function relative_file_root_path()
    {
        $subDirs = implode('/', $this->subDirs);
        if ($subDirs) {
            $subDirs .= '/';
        }
        return $subDirs . $this->fileRoot;
    }
1290614
protected function getPath()
    {
        $path = $this->input->getOption('path');

        if (! is_null($path)) {
            return $this->container['path.base'] .DS .$path;
        }
    }
1247312
protected static function retrieveInstallPath()
    {
        $path1 = DIRECTORY_SEPARATOR.implode(
                DIRECTORY_SEPARATOR,
                array('src', 'Doozr', 'Installer', 'Base.php')
            );

        $path2 = DIRECTORY_SEPARATOR.implode(
                DIRECTORY_SEPARATOR,
                array('vendor', 'clickalicious', 'doozr')
            );

        $path = str_replace($path1, '', __FILE__);
        $path = str_replace($path2, '', $path);

        return realpath($path);
    }
1213025
protected function getRootDirectory()
    {
        if ($this->addon) {
            $directories = $this->addon->config('addon.directories');

            if (! $directories) {
                $directories = ['classes'];
            }

            return $this->addon->path($directories[0]);
        }
        else {
            return parent::getRootDirectory();
        }
    }
1156369
private function getBaseFolder()
    {
        $container = $this->application->getContainer();
        if (
                null === $this->baseFolder 
                && $container->hasParameter('classcontent_thumbnail.base_folder')
        ) {
            $this->baseFolder = $container->getParameter('classcontent_thumbnail.base_folder');
        }

        return $this->baseFolder;
    }
540133
public function getBasePath() 
    {
        $basePath = str_replace($this->getScript(), '', $this->getScriptUrl());
        $basePath = '/' . ltrim($basePath, '/');
        return $basePath;
    }
964912
public static function getBinaryPath(): string
    {
        $binaryName = Utilities::getReleaseName();
        $binaryPath = sprintf('%s/bin/%s', Utilities::getBasePath(), $binaryName);

        return $binaryPath;
    }
1004117
public function getBasePath() : ?string 
    {
        if ( ! $this->hasBasePath()) {
            $this->setBasePath($this->getDefaultBasePath());
        }
        return $this->basePath;
    }
472514
public function getPath()
    {
        $path = $this->path;

        if ( ! empty(static::$basePath)) {
            $path = static::$basePath.DS.ltrim($path, DS);
        }

        return $path;
    }
1196619
public function getBaseDirectory($directoryToAppend = null)
    {

        // load the base directory from the system configuration
        $baseDirectory = $this->getSystemConfiguration()->getBaseDirectory();

        // if a directory has been passed, make it absolute and append it
        if ($directoryToAppend != null) {
            $baseDirectory .= $this->makePathAbsolute($directoryToAppend);
        }

        // return the base directory, with the passed path appended
        return $baseDirectory;
    }
1205781
public function getRootDirectory()
    {
        $dir = $this->getWorktreeDirectory();
        $relativeRoot = trim(str_replace(DIRECTORY_SEPARATOR, '/', $this->gitRepository->getDirectoryToParse()), '/');
        if ($relativeRoot !== '') {
            $dir .= '/' . $relativeRoot;
        }

        return $dir;
    }
410282
public function getBasePath()
    {
        if (null === $this->_basePath) {
            $class = Unit::getReflectionClass($this);
            $this->_basePath = dirname($class->getFileName());
        }
        return $this->_basePath;
    }
670790
public function getBasePath(): string
	{
		if($this->basePath === null)
		{
			$path = $this->server->get('SCRIPT_NAME');

			$this->basePath = rtrim(str_replace(basename($path), '', $path), '/');
		}

		return $this->basePath;
	}
594188
public function basePath($dir = '')
    {
        return $dir == '' ? $this->basePath : $this->basePath . DIRECTORY_SEPARATOR . rtrim($dir, '\/');
    }
755156
protected function detectBasePath()
    {
        $filename = basename($this->getServer()->get('SCRIPT_FILENAME', ''));
        $baseUrl  = $this->getBaseUrl();

        // Empty base url detected
        if ($baseUrl === '') {
            return '';
        }

        // basename() matches the script filename; return the directory
        if (basename($baseUrl) === $filename) {
            return str_replace('\\', '/', dirname($baseUrl));
        }

        // Base path is identical to base URL
        return $baseUrl;
    }
295033
protected function getMigrationPath()
	{
		$path = $this->input->getOption('path');

		// First, we will check to see if a path option has been defined. If it has
		// we will use the path relative to the root of this installation folder
		// so that migrations may be run for any path within the applications.
		if ( ! is_null($path))
		{
			return $this->flyphp['path.base'].'/'.$path;
		}

		$package = $this->input->getOption('package');

		// If the package is in the list of migration paths we received we will put
		// the migrations in that path. Otherwise, we will assume the package is
		// is in the package directories and will place them in that location.
		if ( ! is_null($package))
		{
			return $this->packagePath.'/'.$package.'/src/migrations';
		}

		$bench = $this->input->getOption('bench');

		// Finally we will check for the workbench option, which is a shortcut into
		// specifying the full path for a "workbench" project. Workbenches allow
		// developers to develop packages along side a "standard" app install.
		if ( ! is_null($bench))
		{
			$path = "/workbench/{$bench}/src/migrations";

			return $this->flyphp['path.base'].$path;
		}

		return $this->flyphp['path'].'/database/migrations';
	}