]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/tempfilestrm.tex
fix header wrapper typo
[wxWidgets.git] / docs / latex / wx / tempfilestrm.tex
1 %
2 % automatically generated by HelpGen $Revision$ from
3 % wx/wfstream.h at 07/Mar/05 20:45:33
4 %
5
6 \section{\class{wxTempFileOutputStream}}\label{wxtempfileoutputstream}
7
8 wxTempFileOutputStream is an output stream based on \helpref{wxTempFile}{wxtempfile}. It
9 provides a relatively safe way to replace the contents of the
10 existing file.
11
12 \wxheading{Derived from}
13
14 \helpref{wxOutputStream}{wxoutputstream}\\
15 \helpref{wxStreamBase}{wxstreambase}
16
17 \wxheading{Include files}
18
19 <wx/wfstream.h>
20
21 \wxheading{Library}
22
23 \helpref{wxBase}{librarieslist}
24
25 \wxheading{See also}
26
27 \helpref{wxTempFile}{wxtempfile}
28
29 \latexignore{\rtfignore{\wxheading{Members}}}
30
31
32 \membersection{wxTempFileOutputStream::wxTempFileOutputStream}\label{wxtempfileoutputstreamwxtempfileoutputstream}
33
34 \func{}{wxTempFileOutputStream}{\param{const wxString\& }{fileName}}
35
36 Associates wxTempFileOutputStream with the file to be replaced and opens it. You should use
37 \helpref{IsOk}{wxstreambaseisok} to verify if the constructor succeeded.
38
39 Call \helpref{Commit()}{wxtempfileoutputstreamcommit} or \helpref{Close()}{wxoutputstreamclose} to
40 replace the old file and close this one. Calling \helpref{Discard()}{wxtempfileoutputstreamdiscard}
41 (or allowing the destructor to do it) will discard the changes.
42
43
44 \membersection{wxTempFileOutputStream::Commit}\label{wxtempfileoutputstreamcommit}
45
46 \func{bool}{Commit}{\void}
47
48 Validate changes: deletes the old file of the given name and renames the new
49 file to the old name. Returns {\tt true} if both actions succeeded. If {\tt false} is
50 returned it may unfortunately mean two quite different things: either that
51 either the old file couldn't be deleted or that the new file couldn't be renamed
52 to the old name.
53
54
55 \membersection{wxTempFileOutputStream::Discard}\label{wxtempfileoutputstreamdiscard}
56
57 \func{void}{Discard}{\void}
58
59 Discard changes: the old file contents are not changed, the temporary file is
60 deleted.
61