* Opens a file synchronously and returns a file descriptor. * @param {string} filePath The path to open * @param {string} [flags] Open flags * @param {number} [mode] File mode * @returns {number} The file descriptor
(filePath, flags = 'r', mode)
| 572 | * @returns {number} The file descriptor |
| 573 | */ |
| 574 | openSync(filePath, flags = 'r', mode) { |
| 575 | const providerPath = this.#toProviderPath(filePath); |
| 576 | const handle = this[kProvider].openSync(providerPath, flags, mode); |
| 577 | return openVirtualFd(handle); |
| 578 | } |
| 579 | |
| 580 | /** |
| 581 | * Closes a file descriptor synchronously. |
no test coverage detected