|
package day05;
import java.io.File;
/**
* 删除一个目录
* @author Administrator
*
*/
public class FileDemo5 {
public static void main(String[] args) {
/*
* 删除当前目录下的目录demo
*/
File dir = new File("demo");
boolean isDir = dir.isDirectory();
System.out.println("是否为目录:"+isDir);
if(dir.exists()) {
dir.delete();
System.out.println("删除目录成功");
}
}
} |
————————————————
原文链接:https://blog.csdn.net/weixin_43442290/article/details/87868730
程序猿的技术大观园:www.javathinker.net
[这个贴子最后由 flybird 在 2020-02-06 21:35:05 重新编辑]
|
网站系统异常
系统异常信息 |
Request URL:
http://www.javathinker.net/WEB-INF/lybbs/jsp/topic.jsp?postID=1234
java.lang.NullPointerException
如果你不知道错误发生的原因,请把上面完整的信息提交给本站管理人员。
|
|