MCPcopy Create free account
hub / github.com/GateNLP/gate-core / visitFile

Method visitFile

src/main/java/gate/creole/Plugin.java:689–703  ·  view source on GitHub ↗
(Path filePath,
              BasicFileAttributes attrs)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

relativizeMethod · 0.80
toStringMethod · 0.65
getParentMethod · 0.65

Tested by

no test coverage detected