A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
Programmer Certification (SCJP/OCPJP)
how to get file created date in Java?
Joined: Aug 20, 2001
Oct 10, 2002 10:04:00
Joined: Oct 09, 2002
Oct 10, 2002 14:44:00
Date d = new Date(new File("filename.txt").lastModified());
Creation date is forgotten after the file is modified so lastModified() is all you can get.
I agree. Here's the link:
subject: how to get file created date in Java?
converting java.sql.Date into GregorianCalendar or Calendar
finding created date of a file
file created date
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015