mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-12 09:49:01 +08:00
Add FS size info in [ESP720]
This commit is contained in:
parent
50757b0233
commit
9ba7716cd1
@ -109,7 +109,7 @@
|
|||||||
//ESP_SPIFFS_FILESYSTEM 0
|
//ESP_SPIFFS_FILESYSTEM 0
|
||||||
//ESP_FAT_FILESYSTEM 1
|
//ESP_FAT_FILESYSTEM 1
|
||||||
//ESP_LITTLEFS_FILESYSTEM 2
|
//ESP_LITTLEFS_FILESYSTEM 2
|
||||||
#define FILESYSTEM_FEATURE ESP_FAT_FILESYSTEM
|
#define FILESYSTEM_FEATURE ESP_SPIFFS_FILESYSTEM
|
||||||
|
|
||||||
//DIRECT_PIN_FEATURE: allow to access pin using ESP201 command
|
//DIRECT_PIN_FEATURE: allow to access pin using ESP201 command
|
||||||
#define DIRECT_PIN_FEATURE
|
#define DIRECT_PIN_FEATURE
|
||||||
|
@ -88,6 +88,11 @@ bool Commands::ESP720(const char* cmd_params, level_authenticate_type auth_type,
|
|||||||
f.close();
|
f.close();
|
||||||
output->printf("%d file%s, %d dir%s", countf, (countf > 1)?"(s)":"", countd, (countd > 1)?"(s)":"");
|
output->printf("%d file%s, %d dir%s", countf, (countf > 1)?"(s)":"", countd, (countd > 1)?"(s)":"");
|
||||||
output->printLN("");
|
output->printLN("");
|
||||||
|
String t = ESP_FileSystem::formatBytes(ESP_FileSystem::totalBytes());
|
||||||
|
String u = ESP_FileSystem::formatBytes(ESP_FileSystem::usedBytes());
|
||||||
|
String f = ESP_FileSystem::formatBytes(ESP_FileSystem::freeBytes());
|
||||||
|
output->printf("Total %s, Used %s, Available: %s", t.c_str(), u.c_str(),f.c_str());
|
||||||
|
output->printLN("");
|
||||||
} else {
|
} else {
|
||||||
output->printERROR ("Invalid directory!");
|
output->printERROR ("Invalid directory!");
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
static void end();
|
static void end();
|
||||||
static size_t totalBytes();
|
static size_t totalBytes();
|
||||||
static size_t usedBytes();
|
static size_t usedBytes();
|
||||||
|
static size_t freeBytes(){return totalBytes()-usedBytes();};
|
||||||
static size_t max_update_size();
|
static size_t max_update_size();
|
||||||
static const char * FilesystemName();
|
static const char * FilesystemName();
|
||||||
static bool format();
|
static bool format();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user