emFile - FS_FindNextFile returns wrong file size

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi.

In my project I use FS_FindFirstFile() and FS_FindNextFile() functions in order to list the files on my SD card.

These functions return FS_FIND_DATA structure. One of its fields is FileSize.

I can't see any relation between the numbers I get from this field and the actual files sizes, which I see when I plug the SD card into a PC. According to emFile documentation from Segger, FileSize is "U32 value specifies the size of the file" (U32 = unsigned long).

Anyone else tried to use these functions?

Thanks.

0 Likes
1 Reply
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Can you attach the complete project

Thanks,

Hima

0 Likes