Path/Files
1. Path 생성
// 절대 경로
Path path = Paths.get("c:\\data\\myfile.txt");
// 상대 경로
Path file = Paths.get("d:\\data", "projects\\a-project\\myfile.txt");2. 파일 존재 여부
Path currentFilePath = Paths.get("D:\\Code\\niodata.txt");
boolean isFile = Files.exists(currentFilePath);
System.out.println(String.format("파일 존재 : %s", isFile));Files.exists(currentFilePath, new LinkOption[]{ LinkOption.NOFOLLOW_LINKS});3. 파일/디렉토리 생성

3. 파일 복사/이동
3-1. 파일 복사 : Files.copy()
3-2. 파일 이동 : Files.move()
4. 파일 삭제
Last updated