Homebrew Question Access sdmc filesystem from homebrew

  • Thread starter Thread starter marinaluna
  • Start date Start date
  • Views Views 2,919
  • Replies Replies 3

marinaluna

New Member
Newbie
Joined
Oct 9, 2020
Messages
4
Reaction score
0
Trophies
0
Age
27
XP
89
Country
United States
Hi! I’m developing homebrew for the Switch. When I use opendir(“”) from dirent.h to open the current directory, I can list the files just fine from the “switch” folder. However, trying to open any other directory results in displaying an empty directory when I try to print the entries. My question is, what is the proper way to open sd card directories?
 
Huh, I got it to work without using sdmc:/. Weird.
You can do both sdmc and just slash iirc. If you want to mount the nand you have to do some other stuff and assign it to a mount point.
Edit: And if you do just "" it won't be guaranteed to be the Switch folder. It will be whichever folder the NRO is in, if the user has the NRO in a different place it will access that folder, just something to be aware of.
 
Last edited by CompSciOrBust,

Site & Scene News

Popular threads in this forum