开发者

Netbeans / Java / Delete Files on Mac

I have a problem with my Java program. I want to delete a file on my hdd; I use a MacBook. Here is my code:

public static void main(String[] args) 
{
    File actualFile = new File("/Users/luffy/test.xml");
    actualFile.delete();
}
开发者_如何转开发

chmod is set! Help please.


Make sure that the file is not in use by another program.

Make sure that you have closed all streams accessing this file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜