reactphp / filesystem

Evented filesystem access.
MIT License
135 stars 40 forks source link

Missing append to file #54

Closed ivanmtw closed 4 years ago

ivanmtw commented 5 years ago

Trying write content to existing file, flags 'a' and 'w' so similar, and any write clear previously saved data:

$file = $filesystem->file($tsv_filename); $file->open('ca')->then(function (React\Stream\WritableStreamInterface $stream) use ($tsv_data) { $stream->write(implode("\t", $tsv_data) . "\n"); $stream->end(); echo "Data was written\n"; });

Apologize no file append functionality in reactphp/filesystem, please add it, thx.

clue commented 4 years ago

Resolved via #62. See appendContents().