|
|
@ -211,23 +211,23 @@ public class listManager {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static ArrayList getDirsRecursive(File dir){
|
|
|
|
public static ArrayList getDirsRecursive(File dir, String notdir){
|
|
|
|
return getDirsRecursive(dir, true);
|
|
|
|
return getDirsRecursive(dir, notdir, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns a List of all dirs and subdirs as File Objects
|
|
|
|
* Returns a List of all dirs and subdirs as File Objects
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Warning: untested
|
|
|
|
* Warning: untested
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public static ArrayList getDirsRecursive(File dir, boolean excludeDotfiles){
|
|
|
|
public static ArrayList getDirsRecursive(File dir, String notdir, boolean excludeDotfiles){
|
|
|
|
final File[] dirList = dir.listFiles();
|
|
|
|
final File[] dirList = dir.listFiles();
|
|
|
|
final ArrayList resultList = new ArrayList();
|
|
|
|
final ArrayList resultList = new ArrayList();
|
|
|
|
ArrayList recursive;
|
|
|
|
ArrayList recursive;
|
|
|
|
Iterator iter;
|
|
|
|
Iterator iter;
|
|
|
|
for (int i=0;i<dirList.length;i++) {
|
|
|
|
for (int i=0;i<dirList.length;i++) {
|
|
|
|
if (dirList[i].isDirectory() && (!excludeDotfiles || !dirList[i].getName().startsWith("."))) {
|
|
|
|
if (dirList[i].isDirectory() && (!excludeDotfiles || !dirList[i].getName().startsWith(".")) && !dirList[i].getName().equals(notdir)) {
|
|
|
|
resultList.add(dirList[i]);
|
|
|
|
resultList.add(dirList[i]);
|
|
|
|
recursive = getDirsRecursive(dirList[i], excludeDotfiles);
|
|
|
|
recursive = getDirsRecursive(dirList[i], notdir, excludeDotfiles);
|
|
|
|
iter=recursive.iterator();
|
|
|
|
iter=recursive.iterator();
|
|
|
|
while (iter.hasNext()) {
|
|
|
|
while (iter.hasNext()) {
|
|
|
|
resultList.add(iter.next());
|
|
|
|
resultList.add(iter.next());
|
|
|
@ -275,4 +275,4 @@ public class listManager {
|
|
|
|
// switchboard.urlBlacklist.clear();
|
|
|
|
// switchboard.urlBlacklist.clear();
|
|
|
|
// if (f != "") switchboard.urlBlacklist.loadLists("black", f, "/");
|
|
|
|
// if (f != "") switchboard.urlBlacklist.loadLists("black", f, "/");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|