3
我想创建我的应用程序目录来保存我的配置文件。但黑莓模拟器在创建目录时会引发异常。我已经尝试了下面的代码。在黑莓应用程序的创建目录中抛出“FileIOException:不是目录”
try {
FileConnection myAppDir = (FileConnection) Connector.open("file:///store/home/user/myAppDir", Connector.READ_WRITE);
if (!myAppDir.exists()){
myAppDir.mkdir(); // Exception throw here
}
} catch (Exception e) {
e.printStackTrace();
}
异常抛出
net.rim.device.api.io.file.FileIOException: Not a directory