choks
asked on
file access time
how can i get the time a file was last accessed?sorry about the low points, its all i got left.
Note, there is a difference between modified and accessed, I can access a file without changing the modified time!
ASKER
I dont need the last modified date......i need the last accessed date.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Comment accepted as answer
ASKER
Comment accepted as answer
import java.io.*;
import java.util.*;
class test {
public test() {}
public static void main(String[]args) {
File file = new File(args[0]);
Date date = new Date(file.lastModified());
//this print the last modified time of a file
System.out.println(date.to
}
}