简体   繁体   中英

How to make a directory on iphone using codenameone?

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 :)

These would work:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM