Class Directories

java.lang.Object
com.github.marschall.memoryfilesystem.Directories

public final class Directories extends Object
Implements recursive copy missing in Files.
  • Method Details

    • copyRecursive

      public static void copyRecursive(Path source, Path target, CopyOption... copyOptions) throws IOException
      Copy a directory to a target directory recursively.

      This method performs a copy much like Files.copy(Path, Path, CopyOption...). Unlike Files.copy(Path, Path, CopyOption...) is can also copy non-empty directories.

      This method makes a best effort to copy attributes across different file system providers.

      Known Issues:

      • hard links will not be handled correctly
      Parameters:
      source - the path to the file to copy
      target - the path to the target file (may be associated with a different provider to the source path)
      copyOptions - options specifying how the copy should be done
      Throws:
      IOException - if an I/O error occurs
      See Also: