Determine file creation date in Java

Posted by Todd on Stack Overflow See other posts from Stack Overflow or by Todd
Published on 2010-04-27T18:19:46Z Indexed on 2010/04/27 18:33 UTC
Read the original article Hit count: 348

Filed under:
|
|
|

Hello,

There is another similar question to mine on StackOverflow (How to get creation date of a file in Java), but the answer isn't really there as the OP had a different need that could be solved via other mechanisms. I am trying to create a list of the files in a directory that can be sorted by age, hence the need for the file creation date.

I haven't located any good way to do this after much trawling of the web. Is there a mechanism for getting file creation dates?

Thanks, Todd

BTW, currently on a Windows system, may need this to work on a Linux system as well. Also, I can't guarantee that a file naming convention would be followed where the creation date/time is embedded in the name.

© Stack Overflow or respective owner

Related posts about java

Related posts about filesystems