Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.09 KB | None | 0 0
  1. try  {
  2.         Stream<Path> path = Files.walk(sourceDir).filter(p -> p.toString().endsWith(".cpp"));
  3.             path.forEach(filePath -> {
  4.                 if (Files.isRegularFile(filePath)) {
  5.                     sourcePaths.add(filePath);
  6.                 }
  7.             });
  8.  
  9.             Stream<Path> path = Files.walk(sourceDir).filter(p -> p.toString().endsWith(".c"));
  10.             path.forEach(filePath -> {
  11.                 if (Files.isRegularFile(filePath)) {
  12.                     sourcePaths.add(filePath);
  13.                 }
  14.             });
  15.  
  16.             Stream<Path> path = Files.walk(sourceDir).filter(p -> p.toString().endsWith(".hpp"))
  17.             path.forEach(filePath -> {
  18.                 if (Files.isRegularFile(filePath)) {
  19.                     headerPaths.add(filePath);
  20.                 }
  21.             });
  22.  
  23.             Stream<Path> path = Files.walk(sourceDir).filter(p -> p.toString().endsWith(".h"));
  24.  
  25.             path.forEach(filePath -> {
  26.                 if (Files.isRegularFile(filePath)) {
  27.                     headerPaths.add(filePath);
  28.                 }
  29.             });
  30.  
  31.         } catch (IOException e) {
  32.             e.printStackTrace();
  33.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement