X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c62105945ed63c3b7db9e3e14d942727cb056f9..7104f65dbecd04bfc411252e13e91527da962989:/src/common/filename.cpp diff --git a/src/common/filename.cpp b/src/common/filename.cpp index 57907ce9e2..46f2d0c03d 100644 --- a/src/common/filename.cpp +++ b/src/common/filename.cpp @@ -57,13 +57,19 @@ #include #endif +#ifdef __MWERKS__ + #include + #include + #include +#endif + // ---------------------------------------------------------------------------- // private classes // ---------------------------------------------------------------------------- // small helper class which opens and closes the file - we use it just to get // a file handle for the given file name to pass it to some Win32 API function -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__WXMICROWIN__) class wxFileHandle { @@ -115,7 +121,7 @@ private: // private functions // ---------------------------------------------------------------------------- -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__WXMICROWIN__) // convert between wxDateTime and FILETIME which is a 64-bit value representing // the number of 100-nanosecond intervals since January 1, 1601. @@ -498,8 +504,7 @@ bool wxFileName::SameAs( const wxFileName &filepath, wxPathFormat format) bool wxFileName::IsCaseSensitive( wxPathFormat format ) { // only DOS and OpenVMS filenames are case-sensitive - return ( GetFormat(format) != wxPATH_DOS & - GetFormat(format) != wxPATH_VMS ); + return GetFormat(format) != wxPATH_DOS && GetFormat(format) != wxPATH_VMS; } bool wxFileName::IsRelative( wxPathFormat format ) @@ -1017,7 +1022,20 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess, wxDateTime *dtMod, wxDateTime *dtChange) const { -#if defined(__UNIX_LIKE__) +#if defined(__UNIX_LIKE__) + wxStructStat stBuf; + if ( wxStat(GetFullPath(), &stBuf) == 0 ) + { + if ( dtAccess ) + dtAccess->Set(stBuf.st_atime); + if ( dtMod ) + dtMod->Set(stBuf.st_mtime); + if ( dtChange ) + dtChange->Set(stBuf.st_ctime); + + return TRUE; + } +#elif defined(__WXMAC__) wxStructStat stBuf; if ( wxStat(GetFullPath(), &stBuf) == 0 ) {