src/main/java/org/s2n/ddt/util/FileUtils.java
public static void generateFileList(File node, String source, List<String> fileList) {

		if (node.isFile()) {
			fileList.add(FileUtils.generateZipEntry(node.getAbsolutePath(), source));
		}

		if (node.isDirectory()) {
			String[] subNote = node.list();
			for (String filename : subNote) {
				generateFileList(new File(node, filename), source, fileList);
			}
		}
	}
/**
	 * Traverse a directory and get all files, and add the file into fileList
	 * 
	 * @param node
	 *            file or directory
	 */
Traverse a directory and get all files, and add the file into fileList

@param node
file or directory
Traverse a directory and get all files and add the file into fileList @param node file or directory
public static void generateFileList(File node, String source, List<String> fileList) {
		if (node.isFile()) {
			fileList.add(FileUtils.generateZipEntry(node.getAbsolutePath(), source));
		}
		if (node.isDirectory()) {
			String[] subNote = node.list();
			for (String filename : subNote) {
				generateFileList(new File(node, filename), source, fileList);
			}
		}
	}
public static void generateFileList ( File node , String source , List < String > fileList ) { if ( node . isFile ( ) ) { fileList . add ( FileUtils . generateZipEntry ( node . getAbsolutePath ( ) , source ) ) ; } if ( node . isDirectory ( ) ) { String [ ] subNote = node . list ( ) ; for ( String filename : subNote ) { generateFileList ( new File ( node , filename ) , source , fileList ) ; } } }
Traverse a directory and get all files, and add the file into fileList
Traverse a directory and get all files and add the file into fileList