Restored wxFileName::GetModificationTime() under Classic.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,6 +57,12 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __MWERKS__
|
||||||
|
#include <stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <unix.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private classes
|
// private classes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1017,7 +1023,20 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
|
|||||||
wxDateTime *dtMod,
|
wxDateTime *dtMod,
|
||||||
wxDateTime *dtChange) const
|
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;
|
wxStructStat stBuf;
|
||||||
if ( wxStat(GetFullPath(), &stBuf) == 0 )
|
if ( wxStat(GetFullPath(), &stBuf) == 0 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user