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