Open wpjscc opened 2 days ago
When utilizing UV expansion, the putContents function cannot override the file content.
use React\Filesystem\Factory; use React\Filesystem\Node\FileInterface; require 'vendor/autoload.php'; file_put_contents(__DIR__.'/a.text', '12345678'); Factory::create()->detect(__DIR__.'/a.text')->then(static function (FileInterface $file) { return $file->putContents('876'); })->then(static function ($result): void { var_export([$result]); })->done(); // file content 87645678
fix https://github.com/reactphp/filesystem/pull/118
When utilizing UV expansion, the putContents function cannot override the file content.