function SSH::removeDirectoryJailed

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

Overrides FileTransfer::removeDirectoryJailed

File

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

Class

SSH
The SSH connection class for the update module.

Namespace

Drupal\Core\FileTransfer

Code

protected function removeDirectoryJailed($directory) {
    if (@(!ssh2_exec($this->connection, 'rm -Rf ' . escapeshellarg($directory)))) {
        throw new FileTransferException('Cannot remove @directory.', 0, [
            '@directory' => $directory,
        ]);
    }
}

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