Originally posted by: xtknight
Try something like this:
http://msdn.microsoft.com/library/en-us...lrfCGopherFileFindGetLastWriteTime.asp
Originally posted by: EagleKeeper
There is a Windows class that allows you to retrieve file related info
CFile::GetStatus(CFileStatus &rStatus)
CFileStatus structure components
CTime m_ctime - creation
CTime m_mtime - last modification
CTime m_atime - last accessed
long m_size - logical size in bytes
byte m_attribute - attribute byte of the file
char m_szFullName[_MaxSize] absolute filename
Originally posted by: singh
Originally posted by: xtknight
Try something like this:
http://msdn.microsoft.com/library/en-us...lrfCGopherFileFindGetLastWriteTime.asp
Or rather, something like this: http://msdn.microsoft.com/library/defau...ase/retrieving_the_last_write_time.asp
Modify the example to:
1. Open the file using the CreateFile() API call. For instance,
string fileName = "c:\\example.txt";
HANDLE hFile = CreateFile(fileName.c_str(), GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
2. Check the return values to catch non-existent or inaccessable files.
3. Call CloseFile() on the file handle obtained from CreateFile() once you're finished.