X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/788722ac5ca55bd3c0d1f9bd2d598f90b3b02071..857dab7dcd7cb95dfabbe63761064b8dc949a5ef:/include/wx/filename.h diff --git a/include/wx/filename.h b/include/wx/filename.h index 06696bfdf2..cf12b36501 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -51,6 +51,7 @@ enum wxPathFormat wxPATH_UNIX, wxPATH_MAC, wxPATH_DOS, + wxPATH_VMS, wxPATH_BEOS = wxPATH_UNIX, wxPATH_WIN = wxPATH_DOS, @@ -135,7 +136,7 @@ public: static wxFileName FileName(const wxString& file); static wxFileName DirName(const wxString& dir); - // test for existence + // file tests // is the filename valid at all? bool IsOk() const { return !m_dirs.IsEmpty() || !m_name.IsEmpty(); } @@ -148,11 +149,33 @@ public: bool DirExists(); static bool DirExists( const wxString &dir ); - // Well, get modification time with sec resolution - wxDateTime GetModificationTime(); - // VZ: also need: IsDirWritable(), IsFileExecutable() &c (TODO) + // time functions + + // set the file creation and last access/mod times + // (any of the pointers may be NULL) + bool SetTimes(const wxDateTime *dtCreate, + const wxDateTime *dtAccess, + const wxDateTime *dtMod); + + // set the access and modification times to the current moment + bool Touch(); + + // return the last access, last modification and last change times + // (any of the pointers may be NULL) + bool GetTimes(wxDateTime *dtAccess, + wxDateTime *dtMod, + wxDateTime *dtChange) const; + + // convenience wrapper: get just the last mod time of the file + wxDateTime GetModificationTime() const + { + wxDateTime dtMod; + (void)GetTimes(NULL, &dtMod, NULL); + return dtMod; + } + // various file/dir operations // retrieve the value of the current working directory