Android+Java:File deletion error
hi i 've followin开发者_StackOverflowg code. and i want to delete a zip folder from a particular path
File file = new File("/mibook/"+mFilename+"/"+mZipname.toString());
boolean deleted = file.delete();
but it returns False. why? TIA
edit: For file also this code not working file = new File("/mibook/"+mFilename+"/iphone_settings.css");
You can't delete folders that still have content in it that way. The documentation says: "Directories must be empty before they will be deleted." Try to delete it recursively.
精彩评论