public static function rename($path, $newpath, $cb = null, $pri = EIO_PRI_DEFAULT)
{
$cb = CallbackWrapper::forceWrap($cb);
if (!self::$supported) {
$r = rename($path, $newpath);
if ($cb) {
$cb($path, $newpath, $r);
}
return $r;
}
return eio_rename($path, $newpath, $pri, $cb, $path);
}
/** * Moves an uploaded file to a new location * @param string $filename The filename of the uploaded file * @param string $dest The destination of the moved file * @return boolean Success */ public function moveUploadedFile($filename, $dest) { if (!$this->isUploadedFile($filename)) { return false; } return FileSystem::rename($filename, $dest); }