Skip to content

Commit 6a5f98c

Browse files
authored
FS doc update (#2404)
FSInfo64 removed and FSInfo updated. File name length limitation of LittleFS changed to 255 characters
1 parent bc7adf4 commit 6a5f98c

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

docs/fs.rst

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@ LittleFS File System Limitations
9292
--------------------------------
9393

9494
The LittleFS implementation for the RP2040 supports filenames of up
95-
to 31 characters + terminating zero (i.e. ``char filename[32]``), and
96-
as many subdirectories as space permits.
95+
to 254 characters + terminating zero (i.e. ``char filename[255]`` or
96+
better ``char filename[LFS_NAME_MAX]`` ), and as many subdirectories
97+
as space permits.
9798

9899
Filenames are assumed to be in the root directory if no initial "/" is
99100
present.
@@ -372,8 +373,8 @@ rename
372373
Renames file from ``pathFrom`` to ``pathTo``. Paths must be absolute.
373374
Returns *true* if file was renamed successfully.
374375

375-
info **DEPRECATED**
376-
~~~~~~~~~~~~~~~~~~~~
376+
info
377+
~~~~
377378

378379
.. code:: cpp
379380
@@ -382,18 +383,17 @@ info **DEPRECATED**
382383
383384
Fills `FSInfo structure <#filesystem-information-structure>`__ with
384385
information about the file system. Returns ``true`` if successful,
385-
``false`` otherwise. Because this cannot report information about
386-
filesystemd greater than 4MB, don't use it in new code. Use ``info64``
387-
instead which uses 64-bit fields for filesystem sizes.
386+
``false`` otherwise. ``ìnfo()`` has been updated to support filesystems
387+
greater than 4GB and ``FSInfo64`` and ``info64()`` have been discarded.
388388

389389
Filesystem information structure
390390
--------------------------------
391391

392392
.. code:: cpp
393393
394394
struct FSInfo {
395-
size_t totalBytes;
396-
size_t usedBytes;
395+
uint64_t totalBytes;
396+
uint64_t usedBytes;
397397
size_t blockSize;
398398
size_t pageSize;
399399
size_t maxOpenFiles;
@@ -408,19 +408,6 @@ block size - ``pageSize`` — filesystem logical page size - ``maxOpenFiles``
408408
``maxPathLength`` — max file name length (including one byte for zero
409409
termination)
410410

411-
info64
412-
~~~~~~
413-
414-
.. code:: cpp
415-
416-
FSInfo64 fsinfo;
417-
SDFS.info64(fsinfo);
418-
or LittleFS.info64(fsinfo);
419-
420-
Performs the same operation as ``info`` but allows for reporting greater than
421-
4GB for filesystem size/used/etc. Should be used with the SD and SDFS
422-
filesystems since most SD cards today are greater than 4GB in size.
423-
424411
setTimeCallback(time_t (\*cb)(void))
425412
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
426413

0 commit comments

Comments
 (0)