MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / refresh

Function refresh

src/lib/fileList.js:79–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77 * Refresh file list
78 */
79export async function refresh() {
80 Object.keys(filesTree).forEach((key) => {
81 delete filesTree[key];
82 });
83
84 await Promise.all(
85 addedFolder.map(async ({ url, title }) => {
86 const tree = await Tree.createRoot(url, title);
87 filesTree[url] = tree;
88 trackScan(getAllFiles(tree));
89 }),
90 );
91
92 emit("refresh", filesTree);
93}
94
95export async function whenReady() {
96 await Promise.all([...pendingScans]);

Callers 1

Calls 4

trackScanFunction · 0.85
getAllFilesFunction · 0.85
createRootMethod · 0.80
emitFunction · 0.70

Tested by

no test coverage detected