Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Process.php

function Process::getWorkingDirectory

Gets the working directory.

File

vendor/symfony/process/Process.php, line 1088

Class

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

Namespace

Symfony\Component\Process

Code

public function getWorkingDirectory() : ?string {
    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;
}
RSS feed
Powered by Drupal