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

Function fstat

lib/fs.js:1904–1918  ·  view source on GitHub ↗

* Invokes the callback with the `fs.Stats` * for the file descriptor. * @param {number} fd * @param {{ bigint?: boolean; }} [options] * @param {( * err?: Error, * stats?: Stats * ) => any} [callback] * @returns {void}

(fd, options = { __proto__: null, bigint: false }, callback)

Source from the content-addressed store, hash-verified

1902 * @returns {void}
1903 */
1904function fstat(fd, options = { __proto__: null, bigint: false }, callback) {
1905 if (typeof options === 'function') {
1906 callback = options;
1907 options = kEmptyObject;
1908 }
1909
1910 const h = vfsState.handlers;
1911 if (h !== null && vfsResult(h.fstat(fd, options), callback)) return;
1912
1913 callback = makeStatsCallback(callback);
1914
1915 const req = new FSReqCallback(options.bigint);
1916 req.oncomplete = callback;
1917 binding.fstat(fd, options.bigint, req);
1918}
1919
1920/**
1921 * Retrieves the `fs.Stats` for the symbolic link

Callers

nothing calls this directly

Calls 3

vfsResultFunction · 0.85
makeStatsCallbackFunction · 0.85
fstatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…