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

Method _remove

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

Source from the content-addressed store, hash-verified

421 }
422
423 _remove(entry: FSEntry) {
424 const parentEntry = this._assertDir(path.dirname(entry.path));
425
426 const index = parentEntry.children.indexOf(entry);
427
428 if (index === -1) {
429 // Should never happen so w/e
430 return;
431 }
432
433 parentEntry.children.splice(index, 1);
434 }
435}

Callers 2

unlinkMethod · 0.95
rmdirMethod · 0.95

Calls 2

_assertDirMethod · 0.95
indexOfMethod · 0.45

Tested by

no test coverage detected