MCPcopy Index your code
hub / github.com/nodejs/node / doWriteStream

Function doWriteStream

test/parallel/test-fs-promises-writefile.js:66–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66async function doWriteStream() {
67 await fsPromises.writeFile(dest, stream);
68 const expected = 'abc';
69 const data = fs.readFileSync(dest, 'utf-8');
70 assert.deepStrictEqual(data, expected);
71}
72
73async function doWriteStreamWithCancel() {
74 const controller = new AbortController();

Callers 1

Calls 2

writeFileMethod · 0.45
readFileSyncMethod · 0.45

Tested by

no test coverage detected