+
+ // get the system temporary directory
+ static wxString GetTempDir();
+
+#if wxUSE_FILE || wxUSE_FFILE
+ // get a temp file name starting with the specified prefix
+ void AssignTempFileName(const wxString& prefix);
+ static wxString CreateTempFileName(const wxString& prefix);
+#endif // wxUSE_FILE
+
+#if wxUSE_FILE
+ // get a temp file name starting with the specified prefix and open the
+ // file passed to us using this name for writing (atomically if
+ // possible)
+ void AssignTempFileName(const wxString& prefix, wxFile *fileTemp);
+ static wxString CreateTempFileName(const wxString& prefix,
+ wxFile *fileTemp);
+#endif // wxUSE_FILE
+
+#if wxUSE_FFILE
+ // get a temp file name starting with the specified prefix and open the
+ // file passed to us using this name for writing (atomically if
+ // possible)
+ void AssignTempFileName(const wxString& prefix, wxFFile *fileTemp);
+ static wxString CreateTempFileName(const wxString& prefix,
+ wxFFile *fileTemp);
+#endif // wxUSE_FFILE
+
+ // directory creation and removal.
+ bool Mkdir(int perm = wxS_DIR_DEFAULT, int flags = 0) const;
+ static bool Mkdir(const wxString &dir, int perm = wxS_DIR_DEFAULT,
+ int flags = 0);
+
+ bool Rmdir(int flags = 0) const;
+ static bool Rmdir(const wxString &dir, int flags = 0);
+
+ // operations on the path
+
+ // normalize the path: with the default flags value, the path will be
+ // made absolute, without any ".." and "." and all environment
+ // variables will be expanded in it
+ //
+ // this may be done using another (than current) value of cwd
+ bool Normalize(int flags = wxPATH_NORM_ALL,
+ const wxString& cwd = wxEmptyString,
+ wxPathFormat format = wxPATH_NATIVE);
+
+ // get a path path relative to the given base directory, i.e. opposite
+ // of Normalize
+ //
+ // pass an empty string to get a path relative to the working directory
+ //
+ // returns true if the file name was modified, false if we failed to do
+ // anything with it (happens when the file is on a different volume,
+ // for example)
+ bool MakeRelativeTo(const wxString& pathBase = wxEmptyString,
+ 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); }
+
+
+ // If the path is a symbolic link (Unix-only), indicate that all
+ // filesystem operations on this path should be performed on the link
+ // itself and not on the file it points to, as is the case by default.
+ //
+ // No effect if this is not a symbolic link.
+ void DontFollowLink()
+ {
+ m_dontFollowLinks = true;
+ }
+
+ // If the path is a symbolic link (Unix-only), returns whether various
+ // file operations should act on the link itself, or on its target.
+ //
+ // This does not test if the path is really a symlink or not.
+ bool ShouldFollowLink() const
+ {
+ return !m_dontFollowLinks;
+ }
+
+#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE
+ // if the path is a shortcut, return the target and optionally,
+ // the arguments
+ bool GetShortcutTarget(const wxString& shortcutPath,
+ wxString& targetFilename,
+ wxString* arguments = NULL) const;
+#endif
+
+#ifndef __WXWINCE__
+ // if the path contains the value of the environment variable named envname
+ // then this function replaces it with the string obtained from
+ // wxString::Format(replacementFmtString, value_of_envname_variable)
+ //
+ // Example:
+ // wxFileName fn("/usr/openwin/lib/someFile");
+ // fn.ReplaceEnvVariable("OPENWINHOME");
+ // // now fn.GetFullPath() == "$OPENWINHOME/lib/someFile"
+ bool ReplaceEnvVariable(const wxString& envname,
+ const wxString& replacementFmtString = "$%s",
+ wxPathFormat format = wxPATH_NATIVE);
+#endif
+
+ // replaces, if present in the path, the home directory for the given user
+ // (see wxGetHomeDir) with a tilde
+ bool ReplaceHomeDir(wxPathFormat format = wxPATH_NATIVE);
+
+