MCPcopy Create free account
hub / github.com/BruceDevices/firmware / getScriptsFolder

Function getScriptsFolder

src/modules/bjs_interpreter/interpreter.cpp:178–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178String getScriptsFolder(FS *&fs) {
179 String folder;
180 String possibleFolders[] = {"/scripts", "/BruceScripts", "/BruceJS"};
181 int listSize = sizeof(possibleFolders) / sizeof(possibleFolders[0]);
182
183 for (int i = 0; i < listSize; i++) {
184 if (SD.exists(possibleFolders[i])) {
185 fs = &SD;
186 return possibleFolders[i];
187 }
188 if (LittleFS.exists(possibleFolders[i])) {
189 fs = &LittleFS;
190 return possibleFolders[i];
191 }
192 }
193 return "";
194}
195
196std::vector<Option> getScriptsOptionsList(String currentPath, bool saveStartupScript, int rememberedIndex) {
197 std::vector<Option> opt = {};

Callers 2

getScriptsOptionsListFunction · 0.85
StartupAppMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected