protected function SSH::copyDirectoryJailed

Implements Drupal\Core\FileTransfer\FileTransfer::copyDirectoryJailed().

Overrides FileTransfer::copyDirectoryJailed

File

drupal/core/lib/Drupal/Core/FileTransfer/SSH.php, line 62
Definition of Drupal\Core\FileTransfer\SSH.

Class

SSH
The SSH connection class for the update module.

Namespace

Drupal\Core\FileTransfer

Code

protected function copyDirectoryJailed($source, $destination) {
  if (@(!ssh2_exec($this->connection, 'cp -Rp ' . escapeshellarg($source) . ' ' . escapeshellarg($destination)))) {
    throw new FileTransferException('Cannot copy directory @directory.', NULL, array(
      '@directory' => $source,
    ));
  }
}