SF SD File System Module -Max File Size, max number of files

General discussion relating to the library modules supplied with the compiler

Moderators: David Barker, Jerry Messina

Post Reply
TonyR
Posts: 75
Joined: Fri Jan 14, 2011 11:49 pm
Location: Sydney
Contact:

SF SD File System Module -Max File Size, max number of files

Post by TonyR » Wed Apr 27, 2016 1:25 am

Does anyone know what the max file size is in the SD Card Module and max number of files? Im hoping not to have to try and work through the code to figure it out!

Thanks.

Jerry Messina
Swordfish Developer
Posts: 1246
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: SF SD File System Module -Max File Size, max number of f

Post by Jerry Messina » Wed Apr 27, 2016 6:42 pm

The module supports FAT16 or FAT32 formats.

For FAT16 the max number of files in the root directory is 512 (subdirectories can have more)
FAT16 file size is limited to 2GB.

FAT32 has a max file size of 4GB and the max number of files in a directory is 65,534

TonyR
Posts: 75
Joined: Fri Jan 14, 2011 11:49 pm
Location: Sydney
Contact:

Re: SF SD File System Module -Max File Size, max number of f

Post by TonyR » Thu Apr 28, 2016 12:02 am

Thanks Jerry thats great info.

TonyR
Posts: 75
Joined: Fri Jan 14, 2011 11:49 pm
Location: Sydney
Contact:

Re: SF SD File System Module -Max File Size, max number of f

Post by TonyR » Thu Apr 28, 2016 11:52 pm

BTW is that documented somewhere and I missed it?

Jerry Messina
Swordfish Developer
Posts: 1246
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: SF SD File System Module -Max File Size, max number of f

Post by Jerry Messina » Fri Apr 29, 2016 11:06 am

The original documentation mentioned FAT16 support, and the release notes added FAT32 in later versions.

The limits I mentioned are generic FAT16/FAT32 limits, so I assume they apply since the module didn't say otherwise.
The only limit I saw was on the max number of open files (which I think was 127) or until you run out of memory.

Post Reply