function SSH::createDirectoryJailed

Same name in other branches
  1. 9 core/lib/Drupal/Core/FileTransfer/SSH.php \Drupal\Core\FileTransfer\SSH::createDirectoryJailed()
  2. 10 core/lib/Drupal/Core/FileTransfer/SSH.php \Drupal\Core\FileTransfer\SSH::createDirectoryJailed()
  3. 11.x core/lib/Drupal/Core/FileTransfer/SSH.php \Drupal\Core\FileTransfer\SSH::createDirectoryJailed()

Overrides FileTransfer::createDirectoryJailed

File

core/lib/Drupal/Core/FileTransfer/SSH.php, line 66

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, [
            '@directory' => $directory,
        ]);
    }
}

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