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