📄 foldersearch.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package DownloadManager;import java.util.*;import java.io.*;/** * this class is to get all files existed under specified directory * @author Administrator */public class FolderSearch { private static List fileList=new ArrayList(); public FolderSearch() { } /** this method is called when getting all files under one directory @param dirPath path of directory */ @SuppressWarnings("unchecked") public void LocalFileSearch(String dirPath) { File file = new File(dirPath); File list[] = file.listFiles(); for (int i = 0; i < list.length; i++) { try { if (list[i].isDirectory()) { new FolderSearch().LocalFileSearch(list[i].toString()); } else { fileList.add(list[i].getAbsolutePath()); } } catch (Exception ex) { System.err.println(ex); } } } public List getFileList() { return this.fileList; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -