SSH::removeFileJailed

protected SSH::removeFileJailed($destination)

Removes a file.

Parameters

string $destination: The destination file to be removed.

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

1
2
3
4
5
protected function removeFileJailed($destination) {
  if (!@ssh2_exec($this->connection, 'rm ' . escapeshellarg($destination))) {
    throw new FileTransferException('Cannot remove @directory.', NULL, array('@directory' => $destination));
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.