How can I determine a file's creation date in Windows?

后端 未结 4 1843
一个人的身影
一个人的身影 2021-01-13 02:08

How can I get the date of when a file was created? I am running Windows.

4条回答
  •  心在旅途
    2021-01-13 02:50

    For C, it depends on which operating system you are coding for. Files are a system dependent concept.

    If you're system has it, you can go with the stat() (and friends) function: http://pubs.opengroup.org/onlinepubs/009695399/functions/stat.html.

    On Windows you may use the GetFileTime() function: http://msdn.microsoft.com/en-us/library/ms724320%28v=vs.85%29.aspx.

提交回复
热议问题