Created
November 24, 2014 16:10
-
-
Save lukas2511/5246962e78ab553b616f to your computer and use it in GitHub Desktop.
3ds: list files in directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Handle dirHandle; | |
FS_path dirPath=FS_makePath(PATH_CHAR, "/"); | |
FSUSER_OpenDirectory(NULL, &dirHandle, sdmcArchive, dirPath); | |
u32 entriesRead=0; | |
do { | |
u16 entryBuffer[512]; | |
char data[256]; | |
FSDIR_Read(dirHandle, &entriesRead, 1, (FS_dirent*)entryBuffer); | |
if(!entriesRead){ | |
print("END"); | |
break; | |
} | |
unicodeToChar(data, entryBuffer); | |
print(" - "); | |
print(data); | |
print("\n"); | |
}while(entriesRead>0); | |
FSUSER_CloseArchive(NULL, &sdmcArchive); | |
fsExit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment