MCPcopy Create free account
hub / github.com/Blueforcer/awtrix3 / deleteCustomAppFile

Function deleteCustomAppFile

src/DisplayManager.cpp:334–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334bool deleteCustomAppFile(const String &name)
335{
336 // Create the file name based on the app name
337 String fileName = "/CUSTOMAPPS/" + name + ".json";
338
339 // Check if the file exists
340 if (!LittleFS.exists(fileName))
341 {
342 if (DEBUG_MODE)
343 DEBUG_PRINTLN("File does not exist: " + fileName + ". No need to delete it");
344 return false;
345 }
346
347 // Delete the file
348 if (LittleFS.remove(fileName))
349 {
350 if (DEBUG_MODE)
351 DEBUG_PRINTLN("File removed successfully: " + fileName);
352 return true;
353 }
354 else
355 {
356 if (DEBUG_MODE)
357 DEBUG_PRINTLN("Failed to remove file: " + fileName);
358 return false;
359 }
360}
361
362void removeCustomAppFromApps(const String &name, bool setApps)
363{

Callers 1

removeCustomAppFromAppsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected