mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
Add a FS::check() optional method (#6340)
* Add a FS::check() optional method Fixes #2634 Expose any low-level filesystem check operations for users, and add documentation on this and the gc() methods. * Update doc w/more gc() info and link
This commit is contained in:
committed by
GitHub
parent
d2fde8dee0
commit
c6bfec900c
@ -402,6 +402,31 @@ block size - ``pageSize`` — filesystem logical page size - ``maxOpenFiles``
|
||||
``maxPathLength`` — max file name length (including one byte for zero
|
||||
termination)
|
||||
|
||||
gc
|
||||
~~
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
SPIFFS.gc()
|
||||
|
||||
Only implemented in SPIFFS. Performs a quick garbage collection operation on SPIFFS,
|
||||
possibly making writes perform faster/better in the future. On very full or very fragmented
|
||||
filesystems, using this call can avoid or reduce issues where SPIFFS reports free space
|
||||
but is unable to write additional data to a file. See `this discussion
|
||||
<https://github.com/esp8266/Arduino/pull/6340#discussion_r307042268>` for more info.
|
||||
|
||||
check
|
||||
~~~~~
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
SPIFFS.begin();
|
||||
SPIFFS.check();
|
||||
|
||||
Only implemented in SPIFFS. Performs an in-depth check of the filesystem metadata and
|
||||
correct what is repairable. Not normally needed, and not guaranteed to actually fix
|
||||
anything should there be corruption.
|
||||
|
||||
Directory object (Dir)
|
||||
----------------------
|
||||
|
||||
|
Reference in New Issue
Block a user