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

Method findINode

src/generic/key_value_filesystem.ts:1054–1060  ·  view source on GitHub ↗

* Finds the Inode of the given path. * @param p The path to look up. * @param cb Passed an error or the Inode of the path p. * @todo memoize/cache

(tx: AsyncKeyValueROTransaction, p: string, cb: BFSCallback<Inode>)

Source from the content-addressed store, hash-verified

1052 * @todo memoize/cache
1053 */
1054 private findINode(tx: AsyncKeyValueROTransaction, p: string, cb: BFSCallback<Inode>): void {
1055 this._findINode(tx, path.dirname(p), path.basename(p), (e: ApiError, id?: string): void => {
1056 if (noError(e, cb)) {
1057 this.getINode(tx, p, id!, cb);
1058 }
1059 });
1060 }
1061
1062 /**
1063 * Given the ID of a node, retrieves the corresponding Inode.

Callers 4

statMethod · 0.95
openFileMethod · 0.95
readdirMethod · 0.95

Calls 3

_findINodeMethod · 0.95
getINodeMethod · 0.95
noErrorFunction · 0.85

Tested by

no test coverage detected