📜  java 获取文件的创建日期 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:19.299000             🧑  作者: Mango

代码示例2
Path file = ...;
BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);

System.out.println("creationTime: " + attr.creationTime());
System.out.println("lastAccessTime: " + attr.lastAccessTime());
System.out.println("lastModifiedTime: " + attr.lastModifiedTime());