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

Function createReadStream

lib/fs.js:3746–3754  ·  view source on GitHub ↗

* Creates a readable stream with a default `highWaterMark` * of 64 KiB. * @param {string | Buffer | URL} path * @param {string | { * flags?: string; * encoding?: string; * fd?: number | FileHandle; * mode?: number; * autoClose?: boolean; * emitClose?: boolean; * start: number

(path, options)

Source from the content-addressed store, hash-verified

3744 * @returns {ReadStream}
3745 */
3746function createReadStream(path, options) {
3747 const h = vfsState.handlers;
3748 if (h !== null) {
3749 const result = h.createReadStream(path, options);
3750 if (result !== undefined) return result;
3751 }
3752 lazyLoadStreams();
3753 return new ReadStream(path, options);
3754}
3755
3756/**
3757 * Creates a write stream.

Callers 7

runTestsFunction · 0.50
startMethod · 0.50
startMethod · 0.50
collectCliMdEnvVarNamesFunction · 0.50

Calls 2

lazyLoadStreamsFunction · 0.85
createReadStreamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…