通过ftp接收文件并处理后我尝试删除,但FB抛出此错误:SecurityError:fileWriteResource。
我还在调试;我的应用适用于Android和桌面。 遵循代码:
var xmlFile : File = new File();
if(app == 'ANDROID'){
xmlFile = new File('/mnt/sdcard/SAG/' + dbPath); // PARA ANDROID
if(xmlFile.exists ){
xmlFile.deleteFile();
}
}else if(app == 'DESKTOP'){
//app == DESKTOP
xmlFile = File.applicationDirectory.resolvePath(arquivos.source[itemIndex].name);
if(xmlFile.exists ){
xmlFile.deleteFile();//the file exists, but don´t delete because a error
}
}