MCPcopy Index your code
hub / github.com/Acode-Foundation/Acode / append

Function append

src/lib/fileList.js:38–46  ·  view source on GitHub ↗
(parent, child)

Source from the content-addressed store, hash-verified

36 * @param {string} child file url
37 */
38export async function append(parent, child) {
39 const tree = getTree(Object.values(filesTree), parent);
40 if (!tree || !tree.children) return;
41
42 const childTree = await Tree.create(child);
43 tree.children.push(childTree);
44 trackScan(getAllFiles(childTree));
45 emit("add-file", childTree);
46}
47
48/**
49 * Remove a file from the list

Callers

nothing calls this directly

Calls 5

getTreeFunction · 0.85
trackScanFunction · 0.85
getAllFilesFunction · 0.85
emitFunction · 0.70
createMethod · 0.65

Tested by

no test coverage detected