I have seen most of the previous questions here on Java 1.7 and getting the last file access time.
Here's also a good snippet on import library and how they get the last file access time: http://kodejava.org/how-do-i-get-file-basic-attributes/
I did this:
BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class);
FileTime time = attrs.lastAccessTime();
However, in my IntelliJ IDEA IDE it says, BasicFileAttributes could not be resolved.
So, I imported this:
import java.nio.file.attribute.BasicFileAttributes;
But apparently, file cannot be resolved. I am running Java SDK 1.8 and I am trying to use this in my Android project if that makes a difference.
Not sure why file is missing in the library.
What could I be doing wrong?