Pros and Cons of SDfat and littleFS for SD card file system


Well-known member
Hi All,

I am working on a project that includes a webserver and I plan to implement both webpage serving and file serving primarily for remote datafile download.

Thus far I have been using the SDfat library for file functions, but some webserver examples I'm looking at use littleFS.

Are there any recommendations as to which library might be better suited?
I don't know a whole lot about LittleFS, but it seems to be intended for flash or RAM, as opposed to SD card. The comments in the source code say it is "linked" to SdFat, but I think that means you can use some of the same file functions that are built on top of FileImpl. If it was used to be used for storage on SD, I'm sure the actual storage/retrieval would be via SdFat. Do you understand otherwise?
@mjs513 can probably answer this better but I believe LittleFS is it's own file system and does not use SdFat but uses FS file abstracion. So most file and directory functions that are available for the SD library are also available with LittleFS. MSC is the only filesystem that uses SdFat as well as SD.
As @joepasquariello and @wwatson said is its own file system. Its designed for use with NOR or NAND flash chips. On the T4.1 that could be on the QSPI bus as well as on one of the SPI busses for the T4 or T3.x chips. Also its currently set up for use with RAM on the Teensies. Paul did set up a FS layer so that SDFat type commands can be used with LittleFs but guess that is called an abstraction layer or something like that.