This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


JavaRanch » Java Forums » Java » Java in General
Bookmark "File Attributes" Watch "File Attributes" New topic
Author

File Attributes

Kevin Fonner
Greenhorn

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.
Jeff
Kevin Fonner
Greenhorn

Joined: Sep 20, 2001
Posts: 21
Would it be posible to create your own attributes and save them to a file?
 
jQuery in Action, 3rd edition
 
subject: File Attributes
 
It's not a secret anymore!