Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Attributes

 
Kevin Fonner
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be posible to create your own attributes and save them to a file?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic