.\" This is a wxWidgets manpage page generated from the XML docs .TH wxTempFileOutputStream 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxTempFileOutputStream \- Stream to safely replace an existing file .SH DESCRIPTION wxTempFileOutputStream is an output stream based on wxTempFile . It provides a relatively safe way to replace the contents of the existing file. .SH "PARENTS" wxOutputStream .SH "INCLUDE FILES" wx/wfstream.h .SH MEMBERS .SS wxTempFileOutputStream (const wxString& fileName) Associates wxTempFileOutputStream with the file to be replaced and opens it. You should use IsOk to verify if the constructor succeeded. Call Commit() or Close() to replace the old file and close this one. Calling Discard() (or allowing the destructor to do it) will discard the changes. .SS bool Commit () Validate changes: deletes the old file of the given name and renames the new file to the old name. Returns true if both actions succeeded. If false is returned it may unfortunately mean two quite different things: either that either the old file couldn't be deleted or that the new file couldn't be renamed to the old name. .SS void Discard () Discard changes: the old file contents are not changed, the temporary file is deleted. .SH "SEE ALSO" wxOutputStream wxTempFile .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.