1. 首页
  2. 数据库
  3. 其它
  4. Java读文件写文件txt

Java读文件写文件txt

上传者: 2021-01-16 18:37:33上传 PDF文件 29.68KB 热度 16次
1. 写文件 String filePath = System.getProperty(user.dir)+File.separator+files;//当前项目的运行目录/files,File.separator根据系统的不同,路径的分隔符也不同 String fileName = test.txt; File pathFile = new File(filePath); BufferedWriter out = null; //1:创建文件夹 if (!pathFile.ex
用户评论