IO

xiaoxiao2021-02-28  171

文件是一种存储介质 流概念:源数据源–>程序–>目标数据源 流的基类:

按照处理数据单元划分 字节流字符流

File类

构造:

//多平台 File f = new File("d:"+File.separator+"IO"+File.separator+"test1.txt"); File f = new File("d:IO/test1.txt");

方法:

//创建f1文件夹 f1.mkdirs(); //创建f1文件 f1.createNewFile() //f1文件/文件夹是否存在(返回boolean) f1.exists()
转载请注明原文地址: https://www.6miu.com/read-18400.html

最新回复(0)