1. added wxFileName::CreateTempFileName() and implemented it properly (using
mkstemp() when available) 2. wxTempFile::Open() and wxGetTempFileName() now use CreateTempFileName() avoiding code duplication 3. updated the docs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -185,7 +185,7 @@ WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
|
||||
WXDLLEXPORT void wxStripExtension(wxChar *buffer);
|
||||
WXDLLEXPORT void wxStripExtension(wxString& buffer);
|
||||
|
||||
// Get a temporary filename, opening and closing the file.
|
||||
// Get a temporary filename
|
||||
WXDLLEXPORT wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL);
|
||||
WXDLLEXPORT bool wxGetTempFileName(const wxString& prefix, wxString& buf);
|
||||
|
||||
@@ -197,8 +197,8 @@ WXDLLEXPORT bool wxExpandPath(wxString& dest, const wxChar *path);
|
||||
// and make (if under the home tree) relative to home
|
||||
// [caller must copy-- volatile]
|
||||
WXDLLEXPORT wxChar* wxContractPath(const wxString& filename,
|
||||
const wxString& envname = wxEmptyString,
|
||||
const wxString& user = wxEmptyString);
|
||||
const wxString& envname = wxEmptyString,
|
||||
const wxString& user = wxEmptyString);
|
||||
|
||||
// Destructive removal of /./ and /../ stuff
|
||||
WXDLLEXPORT wxChar* wxRealPath(wxChar *path);
|
||||
|
@@ -200,8 +200,9 @@ public:
|
||||
void AssignHomeDir();
|
||||
static wxString GetHomeDir();
|
||||
|
||||
// get a temp file name starting with thespecified prefix
|
||||
void AssignTempFileName( const wxString &prefix );
|
||||
// get a temp file name starting with the specified prefix
|
||||
void AssignTempFileName(const wxString& prefix);
|
||||
static wxString CreateTempFileName(const wxString& prefix);
|
||||
|
||||
// directory creation and removal.
|
||||
// if full is TRUE, will try to make each directory in the path.
|
||||
|
Reference in New Issue
Block a user