SHARE
TWEET

Untitled

a guest Jun 17th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Project1b.java
  2.  
  3.     FileHilfsKlasse.erzeugeVerzeichnisListePredicateFile("F:\\TestDaten\\_ccOCA1904\\ws\\ccOCA1904",
  4.     ((File e) -> ( e.getName().toLowerCase().contains(".java".toLowerCase()) &&  e.length() > 1000 )) );
  5.  
  6. // -----------------------------------------------------------------------------------------------------------
  7.  
  8. public static void listDirArrayListPredicateFile(File dir, Predicate<File> p) {
  9.     File[] files = dir.listFiles();
  10.     if (files != null) {
  11.       for (File element : files) {
  12.         if (element.isDirectory()) {
  13.           listDirArrayListPredicateFile(element, p);
  14.         } else {
  15. //          if (element.getName().toLowerCase().contains(suche) & p.test()) { // für casesensitive Suche: ohne toLower...
  16.           if (p.test(element)) { // für casesensitive Suche: ohne toLower...
  17.             anzahlDateien++;
  18.             arrayList.add(new DateienMetaDatenSatz(element));
  19.           }
  20.         }
  21.       }
  22.     }
  23.   }
  24. // ---------------------------------------------------------------------------------------------------------------
  25.   public static void erzeugeVerzeichnisListePredicateFile(String dir, Predicate<File> pf ) {
  26.    
  27.     File f = new File(dir);
  28.     final String suche1 = "i";
  29.     listDirArrayListPredicateFile(f, pf);
  30.   }
  31. // ---------------------------------------------------------------------------------------------------------------
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top