+
+// ----------------------------------------------------------------------------
+// wxGetDirectoryTimes: used by wxFileName::GetTimes()
+// ----------------------------------------------------------------------------
+
+#ifdef __WIN32__
+
+extern bool
+wxGetDirectoryTimes(const wxString& dirname,
+ FILETIME *ftAccess, FILETIME *ftCreate, FILETIME *ftMod)
+{
+#ifdef __WXWINCE__
+ // FindFirst() is going to fail
+ wxASSERT_MSG( !dirname.empty(),
+ wxT("incorrect directory name format in wxGetDirectoryTimes") );
+#else
+ // FindFirst() is going to fail
+ wxASSERT_MSG( !dirname.empty() && dirname.Last() != wxT('\\'),
+ wxT("incorrect directory name format in wxGetDirectoryTimes") );
+#endif
+
+ FIND_STRUCT fs;
+ FIND_DATA fd = FindFirst(dirname, wxEmptyString, &fs);
+ if ( !IsFindDataOk(fd) )
+ {
+ return false;
+ }
+
+ *ftAccess = fs.ftLastAccessTime;
+ *ftCreate = fs.ftCreationTime;
+ *ftMod = fs.ftLastWriteTime;
+
+ FindClose(fd);
+
+ return true;
+}
+
+#endif // __WIN32__
+