How do I create a folder in a homebrew program?

Discussion in '3DS - Homebrew Development and Emulators' started by JackMacWindows, Dec 20, 2016.

  1. JackMacWindows

    JackMacWindows Member

    Jan 16, 2016
    United States
    I know this seems like a stupid question, but I am wondering how I can make a directory from a homebrew program. I am writing a program that installs homebrew from zip files, but I need to know how to create a directory to install most 3DSX files. I saw FSUSER_CreateDirectory() in the libctru docs, but that mentions archives which I'm not sure about.

  2. teseting

    teseting Member

    Dec 17, 2016
    United States
    Do it the easy way and use
     mkdir("/dir", 0777);
    also include
    #include <dirent.h> // for more io features or you could just include <sys/stat.h> or <sys/iosupport.h>
    but if you want to do more IO stuff you should probably know how to properly
     FS_Archive sdArch;// you want to reuse this so keep it
    Result Res = FSUSER_OpenArchive(&sdArch, ARCHIVE_SDMC, fsMakePath(PATH_EMPTY, ""));
    FSUSER_CreateDirectory(sdArch, fsMakePath(PATH_ASCII, path), 0);
    also just learn from other people as the code above was copied directly from
    Last edited by teseting, Dec 20, 2016
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice