MCPcopy
hub / github.com/jvilk/BrowserFS / getINode

Method getINode

src/generic/key_value_filesystem.ts:492–498  ·  view source on GitHub ↗

* Given the ID of a node, retrieves the corresponding Inode. * @param tx The transaction to use. * @param p The corresponding path to the file (used for error messages). * @param id The ID to look up.

(tx: SyncKeyValueROTransaction, p: string, id: string)

Source from the content-addressed store, hash-verified

490 * @param id The ID to look up.
491 */
492 private getINode(tx: SyncKeyValueROTransaction, p: string, id: string): Inode {
493 const inode = tx.get(id);
494 if (inode === undefined) {
495 throw ApiError.ENOENT(p);
496 }
497 return Inode.fromBuffer(inode);
498 }
499
500 /**
501 * Given the Inode of a directory, retrieves the corresponding directory

Callers 5

renameSyncMethod · 0.95
_syncSyncMethod · 0.95
_findINodeMethod · 0.95
findINodeMethod · 0.95
removeEntryMethod · 0.95

Calls 3

ENOENTMethod · 0.80
getMethod · 0.65
fromBufferMethod · 0.45

Tested by

no test coverage detected