X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..faab619a858952eb2a46a22234ee42a73bb10bfd:/include/wx/filefn.h diff --git a/include/wx/filefn.h b/include/wx/filefn.h index b0565fdbbf..7160e8d6ea 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -18,6 +18,8 @@ #include "wx/list.h" +#include + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -39,7 +41,15 @@ typedef long off_t; #endif +#if defined(__VISAGECPP__) && __IBMCPP__ >= 400 +// +// VisualAge C++ V4.0 cannot have any const decs +// in headers included by more than one primary source +// +extern const off_t wxInvalidOffset; +#else const off_t wxInvalidOffset = (off_t)-1; +#endif enum wxSeekMode { @@ -84,9 +94,12 @@ WXDLLEXPORT void wxUnix2DosFilename(wxChar *s); #define Unix2DosFilename wxUnix2DosFilename #ifdef __WXMAC__ - WXDLLEXPORT void wxMacPathToFSSpec( const wxChar *path , FSSpec *spec ) ; - WXDLLEXPORT void wxMac2UnixFilename(wxChar *s); - WXDLLEXPORT void wxUnix2MacFilename(wxChar *s); + WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ; + WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ; + WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ; + WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ; + WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ; + WXDLLEXPORT wxString wxUnix2MacFilename( const char *s); #endif // Strip the extension, in situ @@ -95,9 +108,11 @@ WXDLLEXPORT void wxStripExtension(wxString& buffer); // Get a temporary filename, opening and closing the file. WXDLLEXPORT wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL); +WXDLLEXPORT bool wxGetTempFileName(const wxString& prefix, wxString& buf); // Expand file name (~/ and ${OPENWINHOME}/ stuff) WXDLLEXPORT wxChar* wxExpandPath(wxChar *dest, const wxChar *path); +WXDLLEXPORT bool wxExpandPath(wxString& dest, const wxChar *path); // Contract w.r.t environment ( -> ${OPENWINHOME}/lib) // and make (if under the home tree) relative to home @@ -159,15 +174,15 @@ WXDLLEXPORT bool wxMkdir(const wxString& dir, int perm = 0777); WXDLLEXPORT bool wxRmdir(const wxString& dir, int flags = 0); // separators in file names -#define wxFILE_SEP_EXT T('.') -#define wxFILE_SEP_DSK T(':') -#define wxFILE_SEP_PATH_DOS T('\\') -#define wxFILE_SEP_PATH_UNIX T('/') +#define wxFILE_SEP_EXT wxT('.') +#define wxFILE_SEP_DSK wxT(':') +#define wxFILE_SEP_PATH_DOS wxT('\\') +#define wxFILE_SEP_PATH_UNIX wxT('/') // separator in the path list (as in PATH environment variable) // NB: these are strings and not characters on purpose! -#define wxPATH_SEP_DOS T(";") -#define wxPATH_SEP_UNIX T(":") +#define wxPATH_SEP_DOS wxT(";") +#define wxPATH_SEP_UNIX wxT(":") // platform independent versions #ifdef __UNIX__ @@ -207,6 +222,9 @@ WXDLLEXPORT bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const w // On non-Windows platform, probably just return the empty string. WXDLLEXPORT wxString wxGetOSDirectory(); +// Get file modification time +WXDLLEXPORT time_t wxFileModificationTime(const wxString& filename); + // ---------------------------------------------------------------------------- // classes // ----------------------------------------------------------------------------