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

Function addFolder

src/lib/recents.js:39–52  ·  view source on GitHub ↗
(url, opts)

Source from the content-addressed store, hash-verified

37 this.files = files;
38 },
39 addFolder(url, opts) {
40 if (url.slice(-1) === "/") {
41 url = url.slice(0, -1);
42 }
43
44 let folders = this.folders;
45 if (folders.length >= this.MAX) folders.pop();
46 folders = folders.filter((i) => i.url !== url);
47 folders.unshift({
48 url,
49 opts,
50 });
51 this.folders = folders;
52 },
53
54 removeFolder(url) {
55 ({ url } = Url.parse(url));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected