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

Function removePermission

utils/storage_manager.mjs:47–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47async function removePermission() {
48 try {
49 let xml = await readFile(pluginXmlPath, 'utf-8');
50
51 if (!xml.includes('android.permission.MANAGE_EXTERNAL_STORAGE')) {
52 console.log('Permission not found — nothing to remove.');
53 return false;
54 }
55
56 const cleanedXml = xml.replace(permissionRegex, '');
57 await writeFile(pluginXmlPath, cleanedXml, 'utf-8');
58 console.log('Permission removed from plugin.xml');
59 return true
60 } catch (err) {
61 console.error('Failed to remove permission:', err);
62 return false
63 }
64}
65
66
67function updatePlugin() {

Callers 1

handleAnswerFunction · 0.85

Calls 4

logMethod · 0.80
readFileFunction · 0.50
writeFileFunction · 0.50
errorMethod · 0.45

Tested by

no test coverage detected