$spl = new \SplFileInfo($path);
$fname = $spl->getFilename();
if (file_exists($path)) {
- copy($path, $this->wdir . $fname);
+ Files::copyFile($path, $this->wdir . $fname);
}
if (stripos($path, '.mp4') !== false) {
$poster = $posterMedia->getPath('poster');
if (file_exists($poster)) {
$dest = $this->wdir . str_replace('.mp4', '.jpg', $fname);
- copy($poster, $dest);
+ Files::copyFile($poster, $dest);
}
}
/** @var $item Media */
$dest = $tmp . '/' . Files::getFilename($path);
if (file_exists($path)) {
- copy($path, $dest);
+ Files::copyFile($path, $dest);
}
}
Zip::archive($tmp, $zip);