Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When utilizing UV expansion, the putContents function cannot override the file content. #117

Open
wpjscc opened this issue Oct 20, 2024 · 1 comment
Labels

Comments

@wpjscc
Copy link

wpjscc commented Oct 20, 2024

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
@wpjscc wpjscc added the bug label Oct 20, 2024
@wpjscc
Copy link
Author

wpjscc commented Oct 20, 2024

fix #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant