From: Václav Slavík Date: Mon, 31 Jul 2006 12:03:22 +0000 (+0000) Subject: wxFileModificationTime() needs wxDateTime, put it inside wxUSE_DATETIME X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2c5e5cbdb438a3c2717a32ffa50177a319708c23 wxFileModificationTime() needs wxDateTime, put it inside wxUSE_DATETIME git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40394 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 0f3d25f388..5839b81095 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -545,9 +545,13 @@ WXDLLIMPEXP_BASE bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, co // On non-Windows platform, probably just return the empty string. WXDLLIMPEXP_BASE wxString wxGetOSDirectory(); +#if wxUSE_DATETIME + // Get file modification time WXDLLIMPEXP_BASE time_t wxFileModificationTime(const wxString& filename); +#endif // wxUSE_DATETIME + // Parses the wildCard, returning the number of filters. // Returns 0 if none or if there's a problem, // The arrays will contain an equal number of items found before the error. diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 451ec6d421..3707d0a327 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -1625,6 +1625,8 @@ void WXDLLEXPORT wxSplitPath(const wxChar *pszFileName, wxFileName::SplitPath(pszFileName, pstrPath, pstrName, pstrExt); } +#if wxUSE_DATETIME + time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename) { wxDateTime mtime; @@ -1634,6 +1636,8 @@ time_t WXDLLEXPORT wxFileModificationTime(const wxString& filename) return mtime.GetTicks(); } +#endif // wxUSE_DATETIME + // Parses the filterStr, returning the number of filters. // Returns 0 if none or if there's a problem.