Esempio n. 1
0
 private static void _scanFileDir(URL url, int i, int maxLevels, URLScanHandler handler) {
   if (i > maxLevels) return;
   handler.handle(url, i);
   i++;
   handler.startChildren(i);
   URLDirectory dir = new URLDirectory(url);
   for (URL u : dir.list(null)) {
     _scanFileDir(u, i, maxLevels, handler);
   }
   handler.endChildren(i);
 }
Esempio n. 2
0
 public static void scanFiles(URL u, int maxLevels, URLScanHandler handler) {
   handler.start();
   _scanFileDir(u, 0, maxLevels, handler);
   handler.end();
 }