mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Add SPIFFS wrapper for info function
this allow to display total space and used space on SPIFFS
This commit is contained in:
@ -76,6 +76,15 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool info(uint32_t *total, uint32_t *used) override{
|
||||
auto rc = SPIFFS_info(&_fs, total, used);
|
||||
if (rc != SPIFFS_OK) {
|
||||
DEBUGV("SPIFFS_format: rc=%d, err=%d\r\n", rc, _fs.err_code);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool remove(const char* path) override {
|
||||
char tmpName[SPIFFS_OBJ_NAME_LEN];
|
||||
strlcpy(tmpName, path, sizeof(tmpName));
|
||||
|
Reference in New Issue
Block a user