workers streams of files

9 views
Skip to first unread message

Сергей Забабурин

unread,
Oct 31, 2021, 5:25:42 AM10/31/21
to emscripten-discuss
Hi.
I am mount file in workerfs. 
In documentation i see methods read for streams reading.
```
var data = new Uint8Array(32);
var stream = FS.open('dummy', 'w+');
FS.write(stream, data, 0, data.length, 0);
FS.close(stream);
```
But how can i read all the files ?
Where can i see example how can i create readable stream  in js ?

Shlomi Fish

unread,
Nov 1, 2021, 5:12:24 AM11/1/21
to Сергей Забабурин, emscripte...@googlegroups.com
Hi Sergey!
See https://emscripten.org/docs/api_reference/Filesystem-API.html and
https://nodejs.org/api/fs.html .

hope that helps.

--

Shlomi Fish https://www.shlomifish.org/
Let’s talk about restores instead of backups - https://is.gd/WatQqu

Who would win in a fight? Charlemagne, Charles Dickens, Charles Darwin or
Carlos “Chuck” Norris? If Summer Glau was the arbiter, she would just kill all
of them and declare herself the winner.
https://www.shlomifish.org/humour/bits/facts/Summer-Glau/

Please reply to list if it's a mailing list post - https://shlom.in/reply .
Reply all
Reply to author
Forward
0 new messages