How do I set the modification time of a file programmatically in Windows?
相关问题
- Multiple sockets for clients to connect to
- What is the best way to do a search in a large fil
- Inheritance impossible in Windows Runtime Componen
- glDrawElements only draws half a quad
- how to get running process information in java?
From: http://rosettacode.org/wiki/File/Modification_Time#C
See http://msdn.microsoft.com/en-us/library/aa365539%28VS.85%29.aspx
I found this to be useful on windows SetFileTime()
Windows (or the standard CRT, anyhow) has the same utimes family of functions that UNIX has.
Using Win32 functions, FILE_BASIC_INFO can be set using SetFileInformationByHandle.
Use SetFileInformationByHandle with FileInformationType as FILE_BASIC_INFO