パッケージ com.kazurayam.unittest

クラス CopyDir

java.lang.Object
java.nio.file.SimpleFileVisitor<Path>
com.kazurayam.unittest.CopyDir
すべての実装されたインタフェース:
FileVisitor<Path>

public class CopyDir extends SimpleFileVisitor<Path>
original: https://www.codejava.net/java-se/file-io/java-nio-copy-file-or-directory-examples
  • コンストラクタの詳細

    • CopyDir

      public CopyDir(Path sourceDir, Path targetDir) throws IOException
      copy the source directory and its content files/directories to the target directory recursively. If the targetDir is not existing, will create it.
      パラメータ:
      sourceDir - source directory to copy from
      targetDir - target directory to copy into
      例外:
      IOException - any error while i/o
    • CopyDir

      public CopyDir(Path sourceDir, Path targetDir, CopyDir.Option option) throws IOException
      copy the source directory and its content files/directories to the target directory recursively. If the targetDir is not existing, will create it.
      パラメータ:
      sourceDir - source directory to copy from
      targetDir - target directory to copy into
      option - specifies what to do when the target file is found existing
      例外:
      IOException - any error while i/o
  • メソッドの詳細