1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +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

@ -266,6 +266,32 @@ SPIFFS.rename(pathFrom, pathTo)
Renames file from `pathFrom` to `pathTo`. Paths must be absolute. Returns *true*
if file was renamed successfully.
#### info
```c++
FSInfo fs_info;
SPIFFS.info(fs_info);
```
Fills [FSInfo structure](#filesystem-information-structure) with information about
the file system. Returns `true` is successful, `false` otherwise.
### Filesystem information structure
```c++
struct FSInfo {
size_t totalBytes;
size_t usedBytes;
size_t blockSize;
size_t pageSize;
size_t maxOpenFiles;
size_t maxPathLength;
};
```
This is the structure which may be filled using FS::info method. Field names
are self-explanatory.
### Directory object (Dir)
The purpose of *Dir* object is to iterate over files inside a directory.