- 复制后保持文件的创建时间不变
File oldFile = new File("E:\\test\\old.png");
File newFile = new File("E:\\test\\new.png");
FileCopyUtils.copy(oldFile,newFile);
Object creationTime = Files.getAttribute(Paths.get(oldFile.getAbsolutePath()), "creationTime");
Files.setAttribute(Paths.get(newFile.getAbsolutePath()), "creationTime", creationTime);