* Gets an entry by path, throwing if not found. * @param {string} path The path * @param {string} syscall The syscall name for error * @param {boolean} followSymlinks Whether to follow symlinks * @returns {MemoryEntry}
(path, syscall, followSymlinks = true)
| 336 | * @returns {MemoryEntry} |
| 337 | */ |
| 338 | #getEntry(path, syscall, followSymlinks = true) { |
| 339 | const result = this.#lookupEntry(path, followSymlinks); |
| 340 | if (result.eloop) { |
| 341 | throw createELOOP(syscall, path); |
| 342 | } |
| 343 | if (!result.entry) { |
| 344 | throw createENOENT(syscall, path); |
| 345 | } |
| 346 | return result.entry; |
| 347 | } |
| 348 | |
| 349 | /** |
| 350 | * Ensures parent directories exist, optionally creating them. |
no test coverage detected