public function FileMetadata::copyTempToUri in File metadata manager 8.2
Same name and namespace in other branches
- 8 src/FileMetadata.php \Drupal\file_mdm\FileMetadata::copyTempToUri()
Copies the local temporary file to the destination URI.
Return value
bool TRUE if the file was copied successfully, FALSE otherwise.
Overrides FileMetadataInterface::copyTempToUri
File
- src/
FileMetadata.php, line 133
Class
- FileMetadata
- A file metadata object.
Namespace
Drupal\file_mdmCode
public function copyTempToUri() {
if (($temp_path = $this
->getLocalTempPath()) === NULL) {
return FALSE;
}
return (bool) $this->fileSystem
->copy($temp_path, $this
->getUri(), FileSystemInterface::EXISTS_REPLACE);
}