protected function FileTransferSSH::copyDirectoryJailed
protected FileTransferSSH::copyDirectoryJailed($source, $destination)
Copies a directory.
We need a separate method to make the $destination is in the jail.
Parameters
$source: The source path.
$destination: The destination path.
Overrides FileTransfer::copyDirectoryJailed
File
- includes/filetransfer/ssh.inc, line 40
Class
- FileTransferSSH
- The SSH connection class for the update module.
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)); } }
© 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/includes!filetransfer!ssh.inc/function/FileTransferSSH::copyDirectoryJailed/7.x