mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Fix SPIFFS path length check, add notes about FSInfo structure (#1273)
This commit is contained in:
parent
d460de8879
commit
cda14204fe
@ -495,7 +495,7 @@ static bool isSpiffsFilenameValid(const char* name) {
|
|||||||
if (name == nullptr)
|
if (name == nullptr)
|
||||||
return false;
|
return false;
|
||||||
auto len = strlen(name);
|
auto len = strlen(name);
|
||||||
return len > 0 && len <= SPIFFS_OBJ_NAME_LEN;
|
return len > 0 && len < SPIFFS_OBJ_NAME_LEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// these symbols should be defined in the linker script for each flash layout
|
// these symbols should be defined in the linker script for each flash layout
|
||||||
|
@ -169,8 +169,14 @@ struct FSInfo {
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the structure which may be filled using FS::info method. Field names
|
This is the structure which may be filled using FS::info method.
|
||||||
are self-explanatory.
|
- `totalBytes` — total size of useful data on the file system
|
||||||
|
- `usedBytes` — number of bytes used by files
|
||||||
|
- `blockSize` — SPIFFS block size
|
||||||
|
- `pageSize` — SPIFFS logical page size
|
||||||
|
- `maxOpenFiles` — max number of files which may be open simultaneously
|
||||||
|
- `maxPathLength` — max file name length (including one byte for zero termination)
|
||||||
|
|
||||||
|
|
||||||
## Directory object (Dir)
|
## Directory object (Dir)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user