function FileTransfer::copyFile
Same name in other branches
- 9 core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::copyFile()
- 8.9.x core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::copyFile()
- 10 core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::copyFile()
- 11.x core/lib/Drupal/Core/FileTransfer/FileTransfer.php \Drupal\Core\FileTransfer\FileTransfer::copyFile()
Copies a file.
Parameters
$source: The source file.
$destination: The destination file.
1 call to FileTransfer::copyFile()
- FileTransfer::copyDirectoryJailed in includes/
filetransfer/ filetransfer.inc - Copies a directory.
File
-
includes/
filetransfer/ filetransfer.inc, line 134
Class
Code
public final function copyFile($source, $destination) {
$source = $this->sanitizePath($source);
$destination = $this->fixRemotePath($destination);
$this->checkPath($destination);
$this->copyFileJailed($source, $destination);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.