Closed
Description
React\Filesystem\Node\File::putContents
@ line 158 opens without truncating option t
. Hence, it writes the length of the content and leaves previous existing bytes.
It kinda goes against the regular behaviour of file_put_contents
, is this intended?
$file = 'tmp.txt';
file_put_contents( $file, '000');
$promise = $fs->file( $file )->putContents( '11' );
$res = Block\await($promise, $loop);
var_dump( file_get_contents( $file ));
// returns 110 instead of 11
Metadata
Metadata
Assignees
Labels
No labels