Open tototrix23 opened 1 month ago
Hi @tototrix23, thanks for creating an issue.
The order lfs_dir_read
returns files is a bit weird. It's almost alphabetical, but with larger file names being returned first.
Originally the ordering was intended to be strictly alphabetical, but a bug in the comparison logic went unnoticed. Backwards compatible with existing disks makes this difficult to change without a minor/major on-disk version bump. More info here: https://github.com/littlefs-project/littlefs/issues/923.
Still, this ordering can be useful if you want to intentionally order files with same-sized filenames.
Hi everyone,
It's not an issue but a question. When you create hundred of files in a folder and you want to parse it: what is the parsing order ? The oldest created file to the newest ? Is it true all the time ?
Best regards.