i am working on some file uploading mechanism as i am uploading files to Unix server.Now i want the creation date of those uploaded files.I have checked this post Determine file creation date in Java But one of the guy said that its impossible to retrieve file creation date in Unix file system. But i want to fetch the creation date from Unix server where i am uploading file. Any help from you guys ? one more thing is i am using SFTP protocol not the FTP.
Asked
Active
Viewed 86 times
0
-
That particular topic is 6 years old, there have been a lot of changes since then. Have you tried to locate more recent information? – Taegost Jul 05 '16 at 13:18
1 Answers
0
It is true that the initial creation date is not recoverable if the file has been modified. The on-disk i-node only tracks the last time ACCESSED and the last time MODIFIED. Both of those data are returned by the stat( char * ) or fstat( int ) system calls and are available in the st_atime and st_mtime fields, respectively, of struct stat.
SUGGESTION: if the files were installed once and nothing has been added or deleted, then the last time MODIFIED of the DIRECTORY THAT CONTAINS THE FILES would be the datum that you seek.

Bruce David Wilner
- 463
- 2
- 4