 |
ESP3D
3.0
Firmware for ESP boards connected to 3D Printer
|
Go to the documentation of this file.
20 #include "../../include/esp3d_config.h"
21 #if defined (GLOBAL_FILESYSTEM_FEATURE)
22 #include "../commands.h"
23 #include "../esp3doutput.h"
24 #include "../settings_esp3d.h"
25 #include "../../modules/authentication/authentication_service.h"
26 #include "../../modules/filesystem/esp_globalFS.h"
27 #if defined(SD_TIMESTAMP_FEATURE) || defined(FILESYSTEM_TIMESTAMP_FEATURE)
28 #include "../../modules/time/time_server.h"
29 #endif //SD_TIMESTAMP_FEATURE || FILESYSTEM_TIMESTAMP_FEATURE
37 #ifdef AUTHENTICATION_FEATURE
39 output->
printERROR(
"Wrong authentication!", 401);
44 #endif //AUTHENTICATION_FEATURE
45 if (parameter.length() == 0) {
49 output->printf(
"Directory on Global FS : %s", parameter.c_str());
61 output->print(
"<DIR> \t");
62 output->print(sub.
name());
77 output->print(sub.
name());
81 #if defined(SD_TIMESTAMP_FEATURE) || defined(FILESYSTEM_TIMESTAMP_FEATURE)
84 #endif //SD_TIMESTAMP_FEATURE || FILESYSTEM_TIMESTAMP_FEATURE
91 output->printf(
"%d file%s, %d dir%s", countf, (countf > 1)?
"(s)":
"", countd, (countd > 1)?
"(s)":
"");
97 output->printf(
"Total %s, Used %s, Available: %s", t.c_str(), u.c_str(),f.c_str());
110 #endif //GLOBAL_FILESYSTEM_FEATURE
const char * get_param(const char *cmd_params, const char *label)
static String & formatBytes(uint64_t bytes)
size_t printLN(const char *s)
static ESP_GBFile open(const char *path, uint8_t mode=ESP_FILE_READ)
ESP_GBFile openNextFile()
bool ESP780(const char *cmd_params, level_authenticate_type auth_level, ESP3DOutput *output)
static bool exists(const char *path)
const char * name() const
static uint64_t freeBytes(uint8_t FS)
static uint8_t getFSType(const char *path)
size_t printERROR(const char *s, int code_error=200)
static uint64_t totalBytes(uint8_t FS)
static uint64_t usedBytes(uint8_t FS)
const char * current_time(time_t t=0)