在我的应用程序中,我已经编写了删除驱动器中目录的代码,但是当我检查File的删除函数时,它并没有删除文件。我写了类似这样的东西。
目录未被使用:仍然无法删除该目录。
//Code to delete the directory if it exists
File directory = new File("c:\\Report\\");
if(directory.exists())
directory.delete();
目录未被使用:仍然无法删除该目录。