Class CopyDirectoryVisitor

All Implemented Interfaces:
FileVisitor<Path>, PathVisitor

public class CopyDirectoryVisitor extends CountingPathVisitor
Copies a source directory to a target directory.
Since:
2.7
  • Constructor Details

    • CopyDirectoryVisitor

      public CopyDirectoryVisitor(Counters.PathCounters pathCounter, Path sourceDirectory, Path targetDirectory, CopyOption... copyOptions)
      Constructs a new visitor that deletes files except for the files and directories explicitly given.
      Parameters:
      pathCounter - How to count visits.
      sourceDirectory - The source directory
      targetDirectory - The target directory
      copyOptions - Specifies how the copying should be done.
    • CopyDirectoryVisitor

      public CopyDirectoryVisitor(Counters.PathCounters pathCounter, PathFilter fileFilter, PathFilter dirFilter, Path sourceDirectory, Path targetDirectory, CopyOption... copyOptions)
      Constructs a new visitor that deletes files except for the files and directories explicitly given.
      Parameters:
      pathCounter - How to count visits.
      fileFilter - How to filter file paths.
      dirFilter - How to filter directory paths.
      sourceDirectory - The source directory
      targetDirectory - The target directory
      copyOptions - Specifies how the copying should be done.
      Since:
      2.9.0
  • Method Details