gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Folders

#151789 - darkchild - Tue Mar 04, 2008 11:12 pm

Is making folders possible in the DS? :O
because... I googled a bit and don't think "system("mkdir foldername");"
will work -_-'

So, any suggestions? :3

#151797 - nanou - Tue Mar 04, 2008 11:59 pm

You should make a system call to mkdir(), rather than system() call to mkdir. (Actually that's not so accurate on the DS, but I really wanted to say it.)

mkdir(), I believe, is defined as a function, so use that. Really you should almost never be using system() even if your platform supports it.
_________________
- nanou

#151803 - dantheman - Wed Mar 05, 2008 1:56 am

I'd advise that you use this with caution. Both DSReader and DSMaps are known to corrupt cards when creating their own folders on the DS. See http://dsmaps.wordpress.com/2008/02/20/dsmaps-service-release-021a/ for some more detail about the problem with DSMaps.

#151815 - darkchild - Wed Mar 05, 2008 10:49 am

then have you got any suggestions?

#151829 - spinal_cord - Wed Mar 05, 2008 6:24 pm

I used mkdir() in sensitiveds to create a folder, nobody's complained about it to me.
_________________
I'm not a boring person, it's just that boring things keep happening to me.
Homepage

#151831 - nanou - Wed Mar 05, 2008 6:49 pm

darkchild, as I understand it, only people using fat32 are going to have problems with calls to mkdir(). You might want to talk to DMC (the dsmaps guy) about getting the fixed code, or plaster warnings all over your downloads until the problem is fixed.
_________________
- nanou

#151832 - darkchild - Wed Mar 05, 2008 6:54 pm

Ok, I'll try,

By the way, I have a question -_-'

I am having trouble creating subfolders >.>

for example, if I create on on the root, all's ok:


Code:
mkdir ("/foldernamehere", 777);


BUT! if I want to make it in a sub folder -_-'...

Code:
mkdir ("/foldernamehere/zomganotherfolder", 777);

there's an error ...

I went to this website and found some "Errno"'s but none of them seemed to be the case.

Is this another one of those devkit problems? -_-'

Edit : Nevermind xD I wrote "fat1:" at the beginning and all went well! :D