I need not last modification time and not last file accessed time, but file creation time. I have not found information about this. Maybe some libs?
Path p = Pat
How to get the creation date of a file in Java
, using BasicFileAttributes class, this is an example:
Path path = Paths.get("C:\\Users\\jorgesys\\workspaceJava\\myfile.txt");
BasicFileAttributes attr;
try {
attr = Files.readAttributes(path, BasicFileAttributes.class);
System.out.println("Creation date: " + attr.creationTime());
} catch (IOException e) {
System.out.println("oops error! " + e.getMessage());
}