(entry: FSEntry)
| 344 | } |
| 345 | |
| 346 | _assertDirEntry(entry: FSEntry) { |
| 347 | if (entry.type !== 'dir') { |
| 348 | throw new SystemError({ |
| 349 | code: 'ENOTDIR', |
| 350 | errno: -20, |
| 351 | message: `ENOTDIR: not a directory, scandir '${entry.path}'`, |
| 352 | path: entry.path, |
| 353 | syscall: 'scandir', |
| 354 | }); |
| 355 | } |
| 356 | |
| 357 | return entry; |
| 358 | } |
| 359 | |
| 360 | _assertDir(filePath: string) { |
| 361 | const entry = this._assertExists(filePath); |