Listing the contents of the folder in SD


#1

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


#2

#3

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


#4

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?


#5

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