src/Leevel/Http/File.php
protected function moveToTarget(string $sourcePath, string $target, bool $isUploaded = false): void
    {
        set_error_handler(function ($type, $msg) {
            throw new FileException($msg);
        });

        $method = $isUploaded ? 'move_uploaded_file' : 'rename';
        $method($sourcePath, $target);

        restore_error_handler();

        chmod($target, 0666 & ~umask());
    }
protected function moveToTarget(string $sourcePath, string $target, bool $isUploaded = false): void
    {
        set_error_handler(function ($type, $msg) {
            throw new FileException($msg);
        });

        $method = $isUploaded ? 'move_uploaded_file' : 'rename';
        $method($sourcePath, $target);

        restore_error_handler();

        chmod($target, 0666 & ~umask());
    }
移动文件到目标文件.

@param string $sourcePath
@param string $target
@param bool   $isUploaded