(path, options)
| 517 | return promise; |
| 518 | }, |
| 519 | readFile(path, options) { |
| 520 | if (typeof path === 'number') { |
| 521 | const vfd = getVirtualFd(path); |
| 522 | if (vfd) { |
| 523 | const enc = typeof options === 'string' ? options : options?.encoding; |
| 524 | if (enc && enc !== 'buffer') assertEncoding(enc); |
| 525 | return vfd.entry.readFile(options); |
| 526 | } |
| 527 | return undefined; |
| 528 | } |
| 529 | const enc = typeof options === 'string' ? options : options?.encoding; |
| 530 | if (enc && enc !== 'buffer') assertEncoding(enc); |
| 531 | return vfsOp(path, (vfs, n) => vfs.promises.readFile(n, options)); |
| 532 | }, |
| 533 | realpath(path, options) { |
| 534 | const promise = vfsOp(path, (vfs, n) => vfs.promises.realpath(n, options)); |
| 535 | if (promise !== undefined && options?.encoding === 'buffer') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…