Listing the contents of the folder in SD

Are there any examples about listing the contents of the folder in SD?

2 Likes
2 Likes

Thanks, but aren’t they both reading the root folder? I would like to list some sub-folder content.

PokittoDisk is hardcoded to reading the root:
res = pf_opendir(&dir,"");
That second parameter is the path.
Maybe getting it to do what you want is simply a matter of adding a path argument to getFirstFile and forwarding it?

Yes, I tweaked getFirstFile as you suggested and now listing works in any folder :slight_smile:
Have to make a PR at some point.

2 Likes