protected function SSH::removeDirectoryJailed

protected SSH::removeDirectoryJailed($directory)

Removes a directory.

Parameters

string $directory: The directory to be removed.

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!FileTransfer!SSH.php/function/SSH::removeDirectoryJailed/8.1.x