function FileProcessOutputCallback::__construct

File

core/modules/package_manager/src/FileProcessOutputCallback.php, line 27

Class

FileProcessOutputCallback
Logs process output to a file.

Namespace

Drupal\package_manager

Code

public function __construct(string $path, private readonly ?OutputCallbackInterface $decorated = NULL) {
  $this->handle = fopen($path, 'a');
  if (empty($this->handle)) {
    throw new \RuntimeException("Could not open or create '{$path}' for writing.");
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.