You are here

protected function SSH::removeDirectoryJailed in Zircon Profile 8.0

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

Removes a directory.

Parameters

string $directory: The directory to be removed.

Overrides FileTransfer::removeDirectoryJailed

File

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

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.', NULL, array(
      '@directory' => $directory,
    ));
  }
}