MCPcopy Create free account
hub / github.com/bmorcelli/Launcher / createFolder

Function createFolder

src/sd_functions.cpp:209–223  ·  view source on GitHub ↗

** Function name: createFolder ** Description: create new folder ***************************************************************************************/

Source from the content-addressed store, hash-verified

207** Description: create new folder
208***************************************************************************************/
209bool createFolder(String path) {
210 String foldername = keyboard("", 76, "Folder Name: ");
211 if (foldername == "" || foldername == String(KEY_ESCAPE)) { return false; }
212 if (!setupSdCard()) {
213 // Serial.println("Fail to start SDCard");
214 return false;
215 }
216 if (path != "/") path += "/";
217 if (!SDM.mkdir(path + foldername)) {
218 displayRedStripe("Couldn't create folder");
219 launcherDelayMs(2000);
220 return false;
221 }
222 return true;
223}
224
225/***************************************************************************************
226** Function name: sortList

Callers 1

loopSDFunction · 0.85

Calls 3

displayRedStripeFunction · 0.85
launcherDelayMsFunction · 0.85
keyboardFunction · 0.70

Tested by

no test coverage detected