package com.borland.samples.welcome;import java.io.FileNotFoundException;import java.io.IOException;import java.io.File;public class ReadFile {public ReadFile() {}/*** 删除某个文件夹下的所有文件夹和文件* @param delpath String* @throws FileNotFoundException* @throws IOException* @return boolean*/public static boolean deletefile(String delpath) throws FileNotFoundException,IOException {try {File file = new File(delpath);if (!file.isDirectory()) {System.out.println("1");file.delete();}else if (file.isDirectory()) {System.out.println("2");String[] filelist = file.list();for (int i = 0; i
java 读取磁盘文件_java web 如何读取一个磁盘下的一个文件夹下的所有的文件夹和文件的实例...
最新推荐文章于 2021-05-22 02:06:57 发布