开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜