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

Function removeStorage

src/pages/fileBrowser/fileBrowser.js:1119–1142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1117 }
1118
1119 function removeStorage() {
1120 if (url) {
1121 recents.removeFolder(url);
1122 recents.removeFile(url);
1123 }
1124 storageList = storageList.filter((storage) => {
1125 if (storage.uuid !== uuid) {
1126 return true;
1127 }
1128
1129 if (storage.url) {
1130 const parsedUrl = URLParse(storage.url, true);
1131 const keyFile = decodeURIComponent(
1132 parsedUrl.query["keyFile"] || "",
1133 );
1134 if (keyFile) {
1135 fsOperation(keyFile).delete();
1136 }
1137 }
1138 return false;
1139 });
1140 localStorage.storageList = JSON.stringify(storageList);
1141 reload();
1142 }
1143
1144 function renameStorage(newname) {
1145 storageList = storageList.map((storage) => {

Callers

nothing calls this directly

Calls 3

fsOperationFunction · 0.85
reloadFunction · 0.70
deleteMethod · 0.65

Tested by

no test coverage detected