目录
详解
属性:static String separator:与系统有关的默认名称分隔符,为了方便,它被表示为一个字符串。
构造函数
File(File parent, String child):根据 parent 抽象路径名和 child 路径名字符串创建一个新 File 实例。
File(String pathname):通过将给定路径名字符串转换为抽象路径名来创建一个新 File 实例。
File(String parent, String child):根据 parent 路径名字符串和 child 路径名字符串创建一个新 File 实例。
1.创建。
boolean createNewFile():在指定位置创建文件,如果该文件已经存在,则不创建,返回false。和输出流不一样,输出流对象一建立创建文件,而且文件已经存在,会覆盖原文件。
boolean mkdir