Molim za pomoc...
Kako da promenim vreme kreiranja fajla?
Zakačeno
Win32 API: SetFileTime()
http://msdn2.microsoft.com/en-us/library/ms724933.aspx
Primer:
http://msdn2.microsoft.com/en-us/library/ms724205.aspx
http://msdn2.microsoft.com/en-us/library/ms724933.aspx
Primer:
http://msdn2.microsoft.com/en-us/library/ms724205.aspx
Code:
BOOL SetFileToCurrentTime(HANDLE hFile)
{
FILETIME ft;
SYSTEMTIME st;
BOOL f;
GetSystemTime(&st); // gets current time
SystemTimeToFileTime(&st, &ft); // converts to file time format
f = SetFileTime(hFile, // sets last-write time for file
(LPFILETIME) NULL, (LPFILETIME) NULL, &ft);
return f;
}
BOOL SetFileToCurrentTime(HANDLE hFile)
{
FILETIME ft;
SYSTEMTIME st;
BOOL f;
GetSystemTime(&st); // gets current time
SystemTimeToFileTime(&st, &ft); // converts to file time format
f = SetFileTime(hFile, // sets last-write time for file
(LPFILETIME) NULL, (LPFILETIME) NULL, &ft);
return f;
}
Hvala na primerima... samo zaboravio sam da kazem da bi mi trebalo za pod Linux-om...
utime radi posao :)