WALKFILETREE

포스트: 1|아이템:WALKFILETREE(1)
Tags

Posts

1 post

[JAVA] nio를 이용한 파일 및 디렉토리 copy

File srcPath = new File(srcPathStr); File destPath = new File(destPathStr); Files.walkFileTree(srcPath.toPath(), new CopyDirVisitor(srcPath.toPath(), destPath.toPath(), StandardCopyOption.REPLACE_EXISTING)); public static class CopyDirVisitor extends SimpleFileVisitor { private final Path fromPath; private final Pat