I've been writing my own homebrew game recently and I need to write some save files. This itself isn't a problem, but i've been struggling on finding the correct way to handle directory creation and checking for already made directories.
I've found this snippet of code on the forums that has pointed me in the right direction.
Is this a good way of going about creating a directory? How would I go about just checking if a directory exists? What about deleting a directory?
Thanks
I've found this snippet of code on the forums that has pointed me in the right direction.
Code:
void createDir(const char *path)
{
FS_Archive sdArch;
Result Res = FSUSER_OpenArchive(&sdArch, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""));
FSUSER_CreateDirectory(sdArch, fsMakePath(PATH_ASCII, path), 0);
}
Is this a good way of going about creating a directory? How would I go about just checking if a directory exists? What about deleting a directory?
Thanks