MCPcopy
hub / github.com/Kong/insomnia / _assertFileEntry

Method _assertFileEntry

packages/insomnia/src/sync/git/mem-client.ts:401–415  ·  view source on GitHub ↗
(entry: FSEntry)

Source from the content-addressed store, hash-verified

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);

Callers 2

writeFileMethod · 0.95
_assertFileMethod · 0.95

Calls 1

_resolveLinksMethod · 0.95

Tested by

no test coverage detected