function SSH::removeFileJailed

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

Overrides FileTransfer::removeFileJailed

File

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

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

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