(path, _flags, cb)
| 507 | }, |
| 508 | |
| 509 | open(path, _flags, cb) { |
| 510 | try { |
| 511 | const entry = files.get(path); |
| 512 | if (entry?.pendingCreate === true) { |
| 513 | cb(0, openFileHandle(path)); |
| 514 | return; |
| 515 | } |
| 516 | const stat = vfs.statSync(toVfs(path)); |
| 517 | if (stat.isDirectory()) { |
| 518 | cb(ERRNO.EISDIR, 0); |
| 519 | return; |
| 520 | } |
| 521 | if (hasBufferedWrites) { |
| 522 | directWriteVfs.openWriteBufferSync?.(toVfs(path)); |
| 523 | } |
| 524 | cb(0, openFileHandle(path)); |
| 525 | } catch (error) { |
| 526 | cb(toErrno(error), 0); |
| 527 | } |
| 528 | }, |
| 529 | |
| 530 | opendir(path, _flags, cb) { |
| 531 | try { |
nothing calls this directly
no test coverage detected