- Add wxFileName::SetPermissions() (Catalin Raceanu).
- Fix build with wxUSE_FFILE==0 (jroemmler).
- Add wxDEPRECATED_MSG() and use it in a few places.
+- Return the old file descriptor/pointer from wx(F)File::Detach() (troelsk).
All (GUI):
// assign an existing file descriptor and get it back from wxFFile object
void Attach(FILE *lfp, const wxString& name = wxEmptyString)
{ Close(); m_fp = lfp; m_name = name; }
- void Detach() { m_fp = NULL; }
+ FILE* Detach() { FILE* fpOld = m_fp; m_fp = NULL; return fpOld; }
FILE *fp() const { return m_fp; }
// read/write (unbuffered)
// assign an existing file descriptor and get it back from wxFile object
void Attach(int lfd) { Close(); m_fd = lfd; m_lasterror = 0; }
- void Detach() { m_fd = fd_invalid; }
+ int Detach() { int fdOld = m_fd; m_fd = fd_invalid; return fdOld; }
int fd() const { return m_fd; }
// read/write (unbuffered)
closing the file if this descriptor is opened.
IsOpened() will return @false after call to Detach().
+
+ @return The FILE pointer (this is new since wxWidgets 3.0.0, in the
+ previous versions this method didn't return anything).
*/
- void Detach();
+ FILE* Detach();
/**
Returns @true if an attempt has been made to read @e past
Get back a file descriptor from wxFile object - the caller is responsible for
closing the file if this descriptor is opened.
IsOpened() will return @false after call to Detach().
+
+ @return The file descriptor (this is new since wxWidgets 3.0.0, in the
+ previous versions this method didn't return anything).
*/
- void Detach();
+ int Detach();
/**
Returns @true if the end of the file has been reached.