- public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
- Path targetPath = toTargetPath(file);
- try {
- Files.copy(file, targetPath);
- if (log.isDebugEnabled())
- log.debug("Copied " + targetPath);
- } catch (Exception e) {
- log.error("Cannot copy " + file + " to " + targetPath, e);
- }
- return FileVisitResult.CONTINUE;