1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

Refactoring of FS::info (#779)

This commit is contained in:
Ivan Grokhotkov
2015-11-13 13:23:16 +03:00
parent d7e340fe14
commit d0a944e417
6 changed files with 64 additions and 9 deletions

View File

@ -85,6 +85,15 @@ protected:
DirImplPtr _impl;
};
struct FSInfo {
size_t totalBytes;
size_t usedBytes;
size_t blockSize;
size_t pageSize;
size_t maxOpenFiles;
size_t maxPathLength;
};
class FS
{
public:
@ -93,7 +102,7 @@ public:
bool begin();
bool format();
bool info(uint32_t *total, uint32_t *used);
bool info(FSInfo& info);
File open(const char* path, const char* mode);
File open(const String& path, const char* mode);
@ -123,6 +132,7 @@ using fs::SeekMode;
using fs::SeekSet;
using fs::SeekCur;
using fs::SeekEnd;
using fs::FSInfo;
extern FS SPIFFS;