windows下:
int GetModifyDateTime(const wstring& strFilename)
{
struct _stat64i32 statbuf;
_wstat64i32(strFilename.c_str(), &statbuf);
return statbuf.st_mtime;
}
Linux下:
#include <sys/stat.h>
struct stat st;
if(stat(filename,&st) == 0)
{
int modifitm = st.st_mtime;
}