c - How to set the modification time of a file programmatically? -


How do I set a file's revision in Windows?

  struct _utimebuf t; Div class = "text-post" itemprop = "text"> 

T.tma = 1265140799; // Like the 1999 t.tmm = 1265140799; _outime (FN, & amp; t);

By using Win32 functions, it can be set up using.

  FILE_BASIC_INFO b; B Creattion Time Quadpart = 1265140799; B.LastAccessTime.QuadPart = 1265140799; B.LastWriteTime.QuadPart = 1265140799; B Change time .QuadPart = 1265140799; B.FileAttributes = GetFileAttributes (fn); SetFileInformationByHandle (H, FileBasicInfo, & amp; B, Size (B));  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -