* Synchronously retrieves the `fs.Stats` for * the file descriptor. * @param {number} fd * @param {{ bigint?: boolean; }} [options] * @returns {Stats | undefined}
(fd, options = { __proto__: null, bigint: false })
| 2019 | * @returns {Stats | undefined} |
| 2020 | */ |
| 2021 | function fstatSync(fd, options = { __proto__: null, bigint: false }) { |
| 2022 | const h = vfsState.handlers; |
| 2023 | if (h !== null) { |
| 2024 | const result = h.fstatSync(fd); |
| 2025 | if (result !== undefined) return result; |
| 2026 | } |
| 2027 | const stats = binding.fstat(fd, options.bigint, undefined, false); |
| 2028 | if (stats === undefined) { |
| 2029 | return; |
| 2030 | } |
| 2031 | return getStatsFromBinding(stats); |
| 2032 | } |
| 2033 | |
| 2034 | /** |
| 2035 | * Synchronously retrieves the `fs.Stats` for |
nothing calls this directly
no test coverage detected
searching dependent graphs…