(Path filePath,
BasicFileAttributes attrs)
| 687 | |
| 688 | Files.walkFileTree(pathInZip, new SimpleFileVisitor<Path>() { |
| 689 | @Override |
| 690 | public FileVisitResult visitFile(Path filePath, |
| 691 | BasicFileAttributes attrs) throws IOException { |
| 692 | // Make sure that we conserve the hierachy of files and folders |
| 693 | // inside the zip |
| 694 | Path relativePathInZip = pathInZip.relativize(filePath); |
| 695 | Path targetPath = target.resolve(relativePathInZip.toString()); |
| 696 | Files.createDirectories(targetPath.getParent()); |
| 697 | |
| 698 | // And extract the file |
| 699 | Files.copy(filePath, targetPath, |
| 700 | StandardCopyOption.REPLACE_EXISTING); |
| 701 | |
| 702 | return FileVisitResult.CONTINUE; |
| 703 | } |
| 704 | }); |
| 705 | } catch(Exception e) { |
| 706 | // TODO Auto-generated catch block |
nothing calls this directly
no test coverage detected