Answers for "java file creation date"

0

java file creation date

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());
Posted by: Guest on June-24-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language