这听起来像是一个荒谬的问题,但我终究不能在 ios 上使用代号 one 创建一个目录。有人做过吗?这是我尝试的方法(一些愚蠢的测试有些不那么愚蠢,我在这里感到绝望):
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);
我做了各种实验,但总是得到:无法创建目录 xxxxx.. 如果你能帮忙,我会飞到你的位置给你送礼物:)
最佳答案
这些会起作用:
String testpathb = fs.getAppHomePath()+"xxxtestb";
fs.mkdir(testpathb);
String testpathC = fs.getAppHomePath()+"xxxtest/";
fs.mkdir(testpathC);
关于codenameone - 如何使用 codenameone 在 iphone 上创建目录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54212983/