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

Method close

lib/internal/fs/read/context.js:180–194  ·  view source on GitHub ↗
(err)

Source from the content-addressed store, hash-verified

178 }
179
180 close(err) {
181 if (this.isUserFd) {
182 process.nextTick(function tick(context) {
183 FunctionPrototypeCall(readFileAfterClose, { context }, null);
184 }, this);
185 return;
186 }
187
188 const req = new FSReqCallback();
189 req.oncomplete = readFileAfterClose;
190 req.context = this;
191 this.err = err;
192
193 close(this.fd, req);
194 }
195}
196
197module.exports = ReadFileContext;

Callers 1

readMethod · 0.95

Calls 1

closeFunction · 0.50

Tested by

no test coverage detected