Class Directories
java.lang.Object
com.github.marschall.memoryfilesystem.Directories
Implements recursive copy missing in
Files.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyRecursive(Path source, Path target, CopyOption... copyOptions) Copy a directory to a target directory recursively.
-
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...). UnlikeFiles.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 copytarget- 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:
-