You are here

protected function SSH::removeFileJailed 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::removeFileJailed()

Removes a file.

Parameters

string $destination: The destination file to be removed.

Overrides FileTransfer::removeFileJailed

File

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

Class

SSH
The SSH connection class for the update module.

Namespace

Drupal\Core\FileTransfer

Code

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