Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Added: Jun 17, 2021 5:00 PM
Views: 50
Tags: java
  1. try {
  2.             var files = Files.newDirectoryStream(p3);
  3.             for (Path found : files) {
  4.                 if (found.getFileName().toString().toLowerCase(Locale.ROOT).endsWith(".pdf"))
  5.                     System.out.println(found.getFileName());
  6.             }
  7.         }catch (IOException e){
  8.             System.out.println("Verzeichnis existiert nicht");
  9.             e.printStackTrace();
  10.         }