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

Function humanReadableSize

src/webInterface.cpp:78–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78String humanReadableSize(uint64_t bytes) {
79 if (bytes < 1024) return String(bytes) + " B";
80 else if (bytes < (1024 * 1024)) return String(bytes / 1024.0) + " kB";
81 else if (bytes < (1024 * 1024 * 1024)) return String(bytes / 1024.0 / 1024.0) + " MB";
82 else return String(bytes / 1024.0 / 1024.0 / 1024.0) + " GB";
83}
84
85String listFiles(String folder) {
86 String returnText = "pa:" + folder + ":0\n";

Callers 2

listFilesFunction · 0.70
systemInfoHandlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected