Skip to content

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

Description

@wpjscc

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions