Here you can find the source of getFiles(final String path, Vector
Parameter | Description |
---|---|
path | a parameter |
files | a parameter |
public static void getFiles(final String path, Vector<String> files)
//package com.java2s; //License from project: Apache License import java.io.File; import java.util.Vector; public class Main { /**/*from w ww . j av a2 s .com*/ * get all files under the directory path * * @param path * @param files */ public static void getFiles(final String path, Vector<String> files) { getFiles(new File(path), files); } private static void getFiles(final File dir, Vector<String> files) { File[] filelist = dir.listFiles(); for (File file : filelist) { if (file.isDirectory()) { getFiles(file, files); } else { files.add(file.getAbsolutePath()); } } } }