import java.io.*;
import java.util.*;
public class ListDirectory {
public static int listDir(String dir, ArrayList listFile) throws IOException {
int result = 0;
File file = new File(dir);
File fileList[];
if (!file.isDirectory()) {
result = -1;
} else {
fileList = file.listFiles();
for (int i=0; i
listDir(fileList[i].getPath(), listFile);
} else {
listFile.add(fileList[i].getPath());
}
}
}
return result;
}
} Java, java, J2SE, j2se, J2EE, j2ee, J2ME, j2me, ejb, ejb3, JBOSS, jboss, spring, hibernate, jdo, struts, webwork, ajax, AJAX, mysql, MySQL, Oracle, Weblogic, Websphere, scjp, scjd 这是我?
标签: