You are here

protected function SSH::createDirectoryJailed in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/FileTransfer/SSH.php \Drupal\Core\FileTransfer\SSH::createDirectoryJailed()

Creates a directory.

Parameters

string $directory: The directory to be created.

Overrides FileTransfer::createDirectoryJailed

File

core/lib/Drupal/Core/FileTransfer/SSH.php, line 71
Contains \Drupal\Core\FileTransfer\SSH.

Class

SSH
The SSH connection class for the update module.

Namespace

Drupal\Core\FileTransfer

Code

protected function createDirectoryJailed($directory) {
  if (@(!ssh2_exec($this->connection, 'mkdir ' . escapeshellarg($directory)))) {
    throw new FileTransferException('Cannot create directory @directory.', NULL, array(
      '@directory' => $directory,
    ));
  }
}