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

Function createWriteStream

lib/fs.js:3774–3782  ·  view source on GitHub ↗

* Creates a write stream. * @param {string | Buffer | URL} path * @param {string | { * flags?: string; * encoding?: string; * fd?: number | FileHandle; * mode?: number; * autoClose?: boolean; * emitClose?: boolean; * start: number; * fs?: object | null; * signal?: AbortS

(path, options)

Source from the content-addressed store, hash-verified

3772 * @returns {WriteStream}
3773 */
3774function createWriteStream(path, options) {
3775 const h = vfsState.handlers;
3776 if (h !== null) {
3777 const result = h.createWriteStream(path, options);
3778 if (result !== undefined) return result;
3779 }
3780 lazyLoadStreams();
3781 return new WriteStream(path, options);
3782}
3783
3784const lazyGlob = getLazy(() => require('internal/fs/glob').Glob);
3785

Callers 2

runNPMPackageTestsFunction · 0.50

Calls 2

lazyLoadStreamsFunction · 0.85
createWriteStreamMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…