X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9508a23a1ba41b9ff7928982dd48d53d21b12c4e..50d4763f1710f6e45ac6af7112d1ce9effe93bc4:/interface/wx/file.h diff --git a/interface/wx/file.h b/interface/wx/file.h index fd4a44b827..9c01ebdd7d 100644 --- a/interface/wx/file.h +++ b/interface/wx/file.h @@ -3,7 +3,7 @@ // Purpose: interface of wxTempFile, wxFile // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -173,12 +173,12 @@ public: or test if it can be opened for writing with Access(). */ write, - /** Open file for reading and writing; can not be used with Access() */ + /** Open file for reading and writing; cannot be used with Access() */ read_write, /** Open file for appending: the file is opened for writing, but the old contents of the file are not erased and the file pointer is initially placed at the end - of the file; can not be used with Access(). + of the file; cannot be used with Access(). This is the same as OpenMode::write if the file doesn't exist. */ @@ -231,6 +231,32 @@ public: */ ~wxFile(); + /** + Returns the error code for the last unsuccessful operation. + + The error code is system-dependent and corresponds to the value of the + standard @c errno variable when the last error occurred. + + Notice that only simple accessors such as IsOpened() and Eof() (and + this method itself) don't modify the last error value, all other + methods can potentially change it if an error occurs, including the + const ones such as Tell() or Length(). + + @since 2.9.2 + + @see ClearLastError() + */ + int GetLastError() const; + + /** + Resets the error code. + + GetLastError() will return 0 until the next error occurs. + + @since 2.9.2 + */ + void ClearLastError(); + /** This function verifies if we may access the given file in specified mode. Only values of @c wxFile::read or @c wxFile::write really make sense here.