您可以使用 flysystem readStream 功能
$stream = $filesystem->readStream('something/is/here.ext');
然后你可以使用写流直接写入磁盘
$filesystem->writeStream('backups/'.strftime('%G-%m-%d').'.backup', $stream)
或者您可以使用以下代码段直接下载文件
//Get File Extension
$file_extension = ;
//Get File Size
$file_size = ;
// Set the headers, prevent caching.
header("Pragma: public");
header("Expires: -1");
header("Cache-Control: public, must-revalidate, post-check=0, pre-check=0");
header("Content-Transfer-Encoding: binary");
header("Content-Type:application/" . $file_extension);
header('Content-Disposition: attachment; filename="' . $file_name . '"');
header ("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header('Content-Length: ' . $file_size);
header('Accept-Ranges: bytes');
fpassthru($stream);