How to make a directory on iphone using codenameone?

Viewed 48

This sounds like a ridiculous question but I cannot for the life of me make a directory on ios using codenameone. Has anyone done it ? Here is what I try (some dumb tests some not so dumb, im getting desperate here):

FileSystemStorage fs = FileSystemStorage.getInstance();
    fs.mkdir("ZZZTESTA");
    fs.mkdir("ZZZTESTB");
    String testpath = fs.getAppHomePath()+"/xxxtesta";
    fs.mkdir(testpath);
     String testpathb = fs.getAppHomePath()+"xxxtestb";
    fs.mkdir(testpathb);
     String testpathC = fs.getAppHomePath()+"xxxtest/";
    fs.mkdir(testpathC);
    String nativetest = fs.toNativePath(testpathb);        
    fs.mkdir(nativetest);        
     String nativetestb = fs.toNativePath(testpathC);        
    fs.mkdir(nativetestb);

I have done all kinds of experiments but ALWAYS I get : Failed to create directory xxxxx.. I will fly to your location and shower you with gifts if you can help :)

1 Answers

These would work:

String testpathb = fs.getAppHomePath()+"xxxtestb";
fs.mkdir(testpathb);
String testpathC = fs.getAppHomePath()+"xxxtest/";
fs.mkdir(testpathC);
Related