File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes File Attributes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "File Attributes" Watch "File Attributes" New topic

File Attributes

Kevin Fonner

Joined: Sep 20, 2001
Posts: 21
How can I access the attributes of a file such as creation time and last modified with java. Are these properties stored within the file?
Jeff Smith
Ranch Hand

Joined: May 04, 2001
Posts: 50
You can use the lastModified() method on a File to get the time it was last modified. I'm not sure if it's possible to get the creation date or not.
Kevin Fonner

Joined: Sep 20, 2001
Posts: 21
Would it be posible to create your own attributes and save them to a file?
I agree. Here's the link:
subject: File Attributes