MCPcopy Index your code
hub / github.com/nodejs/node / #processHandlerQueue

Method #processHandlerQueue

lib/internal/fs/dir.js:83–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 }
82
83 #processHandlerQueue() {
84 while (this.#handlerQueue.length > 0) {
85 const handler = ArrayPrototypeShift(this.#handlerQueue);
86 const { handle, path } = handler;
87
88 const result = handle.read(
89 this.#options.encoding,
90 this.#options.bufferSize,
91 );
92
93 if (result !== null) {
94 this.#processReadResult(path, result);
95 if (result.length > 0) {
96 ArrayPrototypePush(this.#handlerQueue, handler);
97 }
98 } else {
99 handle.close();
100 }
101
102 if (this.#bufferedEntries.length > 0) {
103 break;
104 }
105 }
106
107 return this.#bufferedEntries.length > 0;
108 }
109
110 read(callback) {
111 return arguments.length === 0 ? this.#readPromisified() : this.#readImpl(true, callback);

Callers 2

#readImplMethod · 0.95
readSyncMethod · 0.95

Calls 3

#processReadResultMethod · 0.95
closeMethod · 0.65
readMethod · 0.45

Tested by

no test coverage detected