开发者

Netbeans / Java / Delete Files on Mac

开发者 https://www.devze.com 2023-01-16 23:17 出处:网络
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:

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

精彩评论

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