hi ,I am new here. My question is: Could sceIoRmdir remove a directory whick is not empty. Because it always return <0 when directory is not enpty.
And is there a function to do it ?
Thanks very much!
sceIoRmdir can't remove a directory which is not empty?
You would have to delete everything inside that directory to successfully delete the directory. Some simple pseudocode that you could translate into proper code:
Code: Select all
void recursiveDelete(string dir)
{
handle h = opendir(dir);
while (string entry = readdir(h))
{
string fullname = dir + '/' + entry;
if (isdir(fullname))
{
recursiveDelete(fullname);
rmdir(fullname);
}
else
unlink(fullname);
}
closedir(h);
}
GE Dominator