Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用codenameone在iphone上创建目录?_Codenameone - Fatal编程技术网

如何使用codenameone在iphone上创建目录?

如何使用codenameone在iphone上创建目录?,codenameone,Codenameone,这听起来像是一个可笑的问题,但我不能用codenameone在ios上创建目录。有人做过吗?以下是我尝试的(一些愚蠢的测试,一些不那么愚蠢,我在这里感到绝望): 我做了各种各样的实验,但总是得到:无法创建目录xxxxx。。如果你能帮忙,我会飞到你的住处,给你送上礼物:)这些会有用的: String testpathb = fs.getAppHomePath()+"xxxtestb"; fs.mkdir(testpathb); String testpathC = fs.getAppHomePat

这听起来像是一个可笑的问题,但我不能用codenameone在ios上创建目录。有人做过吗?以下是我尝试的(一些愚蠢的测试,一些不那么愚蠢,我在这里感到绝望):

我做了各种各样的实验,但总是得到:无法创建目录xxxxx。。如果你能帮忙,我会飞到你的住处,给你送上礼物:)

这些会有用的:

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

你是在模拟器上运行代码还是在真实设备上运行代码?无论如何,以下代码段似乎是正确的:FileSystemStorage fs=FileSystemStorage.getInstance();字符串testpathb=fs.getAppHomePath()+“xxxtestb”;fs.mkdir(testpathb);谢谢Shai,但这正是我的观点,它们不起作用,请自己在iphone上试用:-(呃,哦,我可能是错的,经过这么长时间,不知怎么的,在模拟器和Android上,存储和文件系统存储是一样的,但不是iOS,不知怎么的,iOS报告说它没有达到DIR,但他们已经达到了……抱歉。我现在挖得更深了……老兄,我总是把他们搞混了。
String testpathb = fs.getAppHomePath()+"xxxtestb";
fs.mkdir(testpathb);
String testpathC = fs.getAppHomePath()+"xxxtest/";
fs.mkdir(testpathC);