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

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

代码示例1
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());