public function Process::getWorkingDirectory

Gets the working directory.

Return value

string The current working directory

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Process.php, line 906

Class

Process
Process is a thin wrapper around proc_* functions to ease start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function getWorkingDirectory() {

  // This is for BC only
  if (null === $this->cwd) {

    // getcwd() will return false if any one of the parent directories does not have
    // the readable or search mode set, even if the current directory does
    return getcwd() ?: null;
  }
  return $this->cwd;
}