How to get proper file creation date of file?

后端 未结 3 1910
感动是毒
感动是毒 2021-02-15 16:45

I need not last modification time and not last file accessed time, but file creation time. I have not found information about this. Maybe some libs?

Path p = Pat         


        
3条回答
  •  醉酒成梦
    2021-02-15 17:16

    You won't be able to do this across all systems, since not all systems even record that information. Linux doesn't, for instance; see this SO thread.

    Many programs "modify" a file by copying it, making a change on the copy, and then moving the copy to the original file's location. So for those, there's not a meaningful distinction between creation and last-modification.

提交回复
热议问题