在我通过 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
}
}