Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get the created time of a file  RSS feed

 
K Vidhyakar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any way to get the created date and time of a file? like lastModified() method, is there any way to get this also?
thanks a lot in advance
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that because create time is not supported on all operating systems they had to leave it out of Java. If you don't value OS portability you could write a JNI call to a C/C++ module to get the information from OS APIs.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!