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

Function listFilesHandler

src/webInterface.cpp:620–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618}
619
620esp_err_t listFilesHandler(httpd_req_t *req) {
621 if (!checkUserWebAuth(req)) return ESP_OK;
622 update = false;
623 String folder = queryValue(req, "folder");
624 if (folder.isEmpty()) folder = "/";
625 sendText(req, "text/plain", listFiles(folder));
626 return ESP_OK;
627}
628
629void sendFileDownload(httpd_req_t *req, const String &fileName) {
630 File file = SDM.open(fileName);

Callers

nothing calls this directly

Calls 4

checkUserWebAuthFunction · 0.85
queryValueFunction · 0.85
sendTextFunction · 0.85
listFilesFunction · 0.85

Tested by

no test coverage detected