• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get time of creation of a file?

 
Srinivasan Mani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to get time of creation of a file??
Thanks in advance,
-Srini
 
Vani Yama
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think java.io.File.lastModified() would do the work, assuming the file is not modified after creation. I don't think there is anything like getting creation time for a file.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've done a bit of searching, and haven't been able to find anything Java related that will give you the time of creation. I don't know if this is a platform independent thing.
I did find one snippet of code on a website that allowed you to get the time of creation for a file, but then realized that I was looking at C#
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!