X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..462bc04863a27a56a75faf72c20977a2e958c2a5:/include/wx/filename.h?ds=sidebyside diff --git a/include/wx/filename.h b/include/wx/filename.h index 38e6645e06..cf3bdd91bc 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -6,7 +6,7 @@ // Created: 28.12.00 // RCS-ID: $Id$ // Copyright: (c) 2000 Robert Roebling -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FILENAME_H_ @@ -38,7 +38,7 @@ #include "wx/filefn.h" #include "wx/datetime.h" -class WXDLLEXPORT wxFile; +class WXDLLIMPEXP_BASE wxFile; // ---------------------------------------------------------------------------- // constants @@ -90,7 +90,7 @@ enum // wxFileName: encapsulates a file path // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFileName +class WXDLLIMPEXP_BASE wxFileName { public: // constructors and assignment @@ -175,17 +175,17 @@ public: bool IsOk() const { return !m_dirs.IsEmpty() || !m_name.IsEmpty(); } // does the file with this name exists? - bool FileExists(); + bool FileExists() const; static bool FileExists( const wxString &file ); // does the directory with this name exists? - bool DirExists(); + bool DirExists() const; static bool DirExists( const wxString &dir ); // VZ: also need: IsDirWritable(), IsFileExecutable() &c (TODO) // time functions - +#if wxUSE_DATETIME // set the file last access/mod and creation times // (any of the pointers may be NULL) bool SetTimes(const wxDateTime *dtAccess, @@ -208,6 +208,7 @@ public: (void)GetTimes(NULL, &dtMod, NULL); return dtMod; } +#endif // wxUSE_DATETIME #ifdef __WXMAC__ bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ; @@ -271,6 +272,13 @@ public: bool MakeRelativeTo(const wxString& pathBase = _T(""), wxPathFormat format = wxPATH_NATIVE); + // make the path absolute + // + // this may be done using another (than current) value of cwd + bool MakeAbsolute(const wxString& cwd = wxEmptyString, + wxPathFormat format = wxPATH_NATIVE) + { return Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE | + wxPATH_NORM_TILDE, cwd, format); } // Comparison @@ -386,9 +394,10 @@ public: // deprecated methods, don't use any more // -------------------------------------- +#ifndef __DIGITALMARS__ wxString GetPath( bool withSep, wxPathFormat format = wxPATH_NATIVE ) const { return GetPath(withSep ? wxPATH_GET_SEPARATOR : 0, format); } - +#endif wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const { return GetPath(wxPATH_GET_SEPARATOR, format); }