* 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)
| 1902 | * @returns {void} |
| 1903 | */ |
| 1904 | function 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…