Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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
It's not a secret anymore!