2 % automatically generated by HelpGen $Revision$ from
3 % wx/wfstream.h at 07/Mar/05 20:45:33
6 \section{\class{wxTempFileOutputStream
}}\label{wxtempfileoutputstream
}
8 wxTempFileOutputStream is an output stream based on
\helpref{wxTempFile
}{wxtempfile
}. It
9 provides a relatively safe way to replace the contents of the
12 \wxheading{Derived from
}
14 \helpref{wxOutputStream
}{wxoutputstream
}
16 \wxheading{Include files
}
22 \helpref{wxBase
}{librarieslist
}
26 \helpref{wxTempFile
}{wxtempfile
}
28 \latexignore{\rtfignore{\wxheading{Members
}}}
31 \membersection{wxTempFileOutputStream::wxTempFileOutputStream
}\label{wxtempfileoutputstreamwxtempfileoutputstream
}
33 \func{}{wxTempFileOutputStream
}{\param{const wxString\&
}{fileName
}}
35 Associates wxTempFileOutputStream with the file to be replaced and opens it. You should use
36 \helpref{IsOk
}{wxstreambaseisok
} to verify if the constructor succeeded.
38 Call
\helpref{Commit()
}{wxtempfileoutputstreamcommit
} or
\helpref{Close()
}{wxoutputstreamclose
} to
39 replace the old file and close this one. Calling
\helpref{Discard()
}{wxtempfileoutputstreamdiscard
}
40 (or allowing the destructor to do it) will discard the changes.
43 \membersection{wxTempFileOutputStream::Commit
}\label{wxtempfileoutputstreamcommit
}
45 \func{bool
}{Commit
}{\void}
47 Validate changes: deletes the old file of the given name and renames the new
48 file to the old name. Returns
{\tt true
} if both actions succeeded. If
{\tt false
} is
49 returned it may unfortunately mean two quite different things: either that
50 either the old file couldn't be deleted or that the new file couldn't be renamed
54 \membersection{wxTempFileOutputStream::Discard
}\label{wxtempfileoutputstreamdiscard
}
56 \func{void
}{Discard
}{\void}
58 Discard changes: the old file contents are not changed, the temporary file is