(entry: FSEntry)
| 399 | } |
| 400 | |
| 401 | _assertFileEntry(entry: FSEntry) { |
| 402 | entry = this._resolveLinks(entry); |
| 403 | |
| 404 | if (entry.type === 'dir') { |
| 405 | throw new SystemError({ |
| 406 | code: 'EISDIR', |
| 407 | errno: -21, |
| 408 | message: `EISDIR: illegal operation on a directory '${entry.path}'`, |
| 409 | path: entry.path, |
| 410 | syscall: 'open', |
| 411 | }); |
| 412 | } |
| 413 | |
| 414 | return entry; |
| 415 | } |
| 416 | |
| 417 | _assertFile(filePath: string) { |
| 418 | const entry = this._assertExists(filePath); |
no test coverage detected