Get the full path to the Drush executable.

@return string
The absolute path to the executable, or 'drush' if the path is not
known.
768852
protected function getDrushExecutable()
    {
        if (isset($this->executable)) {
            return $this->executable;
        }

        if ($this->config->has('local.drush_executable')) {
            return $this->executable = $this->config->get('local.drush_executable');
        }

        // Find a locally installed Drush instance: first check the Composer
        // 'vendor' directory.
        $projectRoot = $this->localProject->getProjectRoot();
        $localDir = $projectRoot ?: getcwd();
        $drushLocal = $localDir . '/vendor/bin/drush';
        if (is_executable($drushLocal)) {
            return $this->executable = $drushLocal;
        }

        // Check the local dependencies directory (created via 'platform
        // build').
        $drushDep = $localDir . '/' . $this->config->get('local.dependencies_dir') . '/php/vendor/bin/drush';
        if (is_executable($drushDep)) {
            return $this->executable = $drushDep;
        }

        // Use the global Drush, if there is one installed.
        if ($this->shellHelper->commandExists('drush')) {
            return $this->executable = $this->shellHelper->resolveCommand('drush');
        }

        // Fall back to the Drush that may be installed within the CLI.
        $drushCli = CLI_ROOT . '/vendor/bin/drush';
        if (is_executable($drushCli)) {
            return $this->executable = $drushCli;
        }

        return $this->executable = 'drush';
    }
20792
protected function getFilePath()
    {
        $fullName = $this->fullName;

        $rootPath = public_path();

        $fullName = ltrim($fullName, '/');


        return $rootPath . '/' . $fullName;
    }
1097816
public function getOutputPath()
    {
        $base = getcwd() . DIRECTORY_SEPARATOR;

        if (isset($this->raw->output)) {
            $path = $this->raw->output;

            if (false === Path::isAbsolute($path)) {
                $path = Path::canonical($base . $path);
            }
        } else {
            $path = $base . 'default.phar';
        }

        if (false !== strpos($path, '@' . 'git-version@')) {
            $path = str_replace('@' . 'git-version@', $this->getGitVersion(), $path);
        }

        return $path;
    }
1170614
public function getAbsolutePath()
    {
        if ($this->storage->supportsAbsolutePaths()) {
            return $this->storage->getAbsolutePath($this->key);
        }

        return $this->getKey();
    }
222700
public function full_file_root_path()
    {
        $subDirs = implode('/', $this->subDirs);
        if ($subDirs) {
            $subDirs .= '/';
        }
        return $this->baseDir . '/' . $subDirs . $this->fileRoot;
    }
845628
public function getPath()
    {
        $pathInfo = rawurldecode($this->getPathInfo());
        $path = '/' . trim($pathInfo, '/');

        return ($path == '/') ? '' : $path;
    }
1073313
public function getPath()
	{
		$realpath	= realpath( $this->fileName );
		$path	= dirname( $realpath );
		$path	= str_replace( "\\", "/", $path );
		$path	.= "/";
		return	$path;
	}
1243127
public function getPath(): string
    {
        if (!$this->path) {
            if (\defined('PATH_APPLICATION')) {
                $this->path = PATH_APPLICATION;
            } else {
                $reflection = new \ReflectionClass($this);
                // 3 level up
                $this->path = \dirname($reflection->getFileName(), 3);
            }
        }
        return $this->path;
    }
324058
public function getPath()
    {
        $controller = str_replace('\\', '/', $this->get('controller'));

        $path = (empty($controller) ? '' : $controller . '/') . $this->get('name') . '.' . $this->get('format') . '.' . $this->get('engine');

        return empty($this->parameters['module']) ?
            self::APP_VIEWS_DIRECTORY . '/' . $path : '@' . $this->get('module') . '/' . self::MODULE_VIEWS_DIRECTORY . '/' . $path;
    }
985569
private function getFilePath()
    {
        $fullname = $this->fullName;
        $rootPath = $_SERVER['DOCUMENT_ROOT'];

        if (substr($fullname, 0, 1) != '/') {
            $fullname = '/' . $fullname;
        }

        return $rootPath . $fullname;
    }
894429
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->container['path.base'] .DS .$path;
        }

        return $this->container['path'] .DS .'Database' .DS .'Migrations';
    }
902136
public function getPath()
    {
        if ($this->file !== null) {
            return $this->file->getForLocalProcessing(false);
        } else {
            return $this->fileInfo['path'];
        }
    }
262461
public static function getInstallationPath()
    {
        self::setPackageDir();

        $path = realpath( self::$packageDir );
        if ( substr( $path, -1 ) !== DIRECTORY_SEPARATOR )
        {
            $path .= DIRECTORY_SEPARATOR;
        }
        return $path;
    }
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;
	}
1290614
protected function getPath()
    {
        $path = $this->input->getOption('path');

        if (! is_null($path)) {
            return $this->container['path.base'] .DS .$path;
        }
    }
242827
public function getPath(): string
	{
		if($this->path === null)
		{
			$this->path = dirname((new ReflectionClass($this))->getFileName(), 2);
		}

		return $this->path;
	}
68323
public function path(){

        $args = \func_get_args();

        switch (\count($args)){

            case 1:

                $file  = $args[0];

                if ($this->isAbsolutePath($file) && \file_exists($file)) {
                    return $file;
                }

                $parts = \explode(':', $file, 2);

                if (count($parts)==2){
                    if (!isset($this->paths[$parts[0]])) return false;

                    foreach ($this->paths[$parts[0]] as &$path){
                        if (\file_exists($path.$parts[1])){
                            return $path.$parts[1];
                        }
                    }
                }

                return false;

            case 2:

                if (!isset($this->paths[$args[0]])) {
                    $this->paths[$args[0]] = [];
                }
                \array_unshift($this->paths[$args[0]], \rtrim(\str_replace(DIRECTORY_SEPARATOR, '/', $args[1]), '/').'/');

                return $this;
        }

        return null;
    }