Ejemplo n.º 1
0
 private boolean register(File f) {
   boolean rc = false;
   if (f.isDirectory()) {
     File file[] = f.listFiles(this);
     for (int i = 0; i < file.length; i++) {
       if (register(file[i])) rc = true;
     }
   } else if (dirMap.get(f) == null) {
     dirMap.put(f, new QEntry());
     rc = true;
   }
   return rc;
 }
Ejemplo n.º 2
0
 private boolean scan() {
   boolean rc = false;
   File file[] = deployDir.listFiles(this);
   // Arrays.sort (file); --apr not required - we use TreeMap
   if (file == null) {
     // Shutting down might be best, how to trigger from within?
     throw new Error("Deploy directory \"" + deployDir.getAbsolutePath() + "\" is not available");
   } else {
     for (File f : file) {
       if (register(f)) rc = true;
     }
   }
   return rc;
 }