Add wxTempFileOutputStream
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -493,6 +493,7 @@ libraries, and to provide enhanced functionality.
|
||||
\twocolitem{\helpref{wxFileOutputStream}{wxfileoutputstream}}{File output stream class}
|
||||
\twocolitem{\helpref{wxFFileInputStream}{wxffileinputstream}}{Another file input stream class}
|
||||
\twocolitem{\helpref{wxFFileOutputStream}{wxffileoutputstream}}{Another file output stream class}
|
||||
\twocolitem{\helpref{wxTempFileOutputStream}{wxtempfileoutputstream}}{Stream to safely replace an existing file}
|
||||
\twocolitem{\helpref{wxStringInputStream}{wxstringinputstream}}{String input stream class}
|
||||
\twocolitem{\helpref{wxStringOutputStream}{wxstringoutputstream}}{String output stream class}
|
||||
\twocolitem{\helpref{wxZlibInputStream}{wxzlibinputstream}}{Zlib (compression) input stream class}
|
||||
|
@@ -323,6 +323,7 @@
|
||||
\input tcpconn.tex
|
||||
\input tcpservr.tex
|
||||
\input tempfile.tex
|
||||
\input tempfilestrm.tex
|
||||
\input text.tex
|
||||
\input txtdatob.tex
|
||||
\input txtdrptg.tex
|
||||
|
@@ -43,7 +43,8 @@ No base class
|
||||
|
||||
\wxheading{See also:}
|
||||
|
||||
\helpref{wxFile}{wxfile}
|
||||
\helpref{wxFile}{wxfile}\\
|
||||
\helpref{wxTempFileOutputStream}{wxtempfileoutputstream}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
@@ -79,6 +80,25 @@ and the program should have write access to it for the function to succeed.
|
||||
|
||||
Returns {\tt true} if the file was successfully opened.
|
||||
|
||||
\membersection{wxTempFile::Length}\label{wxtempfilelength}
|
||||
|
||||
\constfunc{wxFileOffset}{Length}{\void}
|
||||
|
||||
Returns the length of the file.
|
||||
|
||||
\membersection{wxTempFile::Seek}\label{wxtempfileseek}
|
||||
|
||||
\func{wxFileOffset}{Seek}{\param{wxFileOffset }{ofs}, \param{wxSeekMode }{mode = wxFromStart}}
|
||||
|
||||
Seeks to the specified position.
|
||||
|
||||
\membersection{wxTempFile::Tell}\label{wxtempfiletell}
|
||||
|
||||
\constfunc{wxFileOffset}{Tell}{\void}
|
||||
|
||||
Returns the current position or wxInvalidOffset if file is not opened or if another
|
||||
error occurred.
|
||||
|
||||
\membersection{wxTempFile::Write}\label{wxtempfilewrite}
|
||||
|
||||
\func{bool}{Write}{\param{const void }{*p}, \param{size\_t }{n}}
|
||||
|
55
docs/latex/wx/tempfilestrm.tex
Normal file
55
docs/latex/wx/tempfilestrm.tex
Normal file
@@ -0,0 +1,55 @@
|
||||
%
|
||||
% automatically generated by HelpGen $Revision$ from
|
||||
% wx/wfstream.h at 07/Mar/05 20:45:33
|
||||
%
|
||||
|
||||
\section{\class{wxTempFileOutputStream}}\label{wxtempfileoutputstream}
|
||||
|
||||
wxTempFileOutputStream is an output stream based on \helpref{wxTempFile}{wxtempfile}. It
|
||||
provides a relatively safe way to replace the contents of the
|
||||
existing file.
|
||||
|
||||
\wxheading{Derived from}
|
||||
|
||||
\helpref{wxOutputStream}{wxoutputstream}
|
||||
|
||||
\wxheading{Include files}
|
||||
|
||||
<wx/wfstream.h>
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{wxTempFile}{wxtempfile}
|
||||
|
||||
\latexignore{\rtfignore{\wxheading{Members}}}
|
||||
|
||||
|
||||
\membersection{wxTempFileOutputStream::wxTempFileOutputStream}\label{wxtempfileoutputstreamwxtempfileoutputstream}
|
||||
|
||||
\func{}{wxTempFileOutputStream}{\param{const wxString\& }{fileName}}
|
||||
|
||||
Associates wxTempFileOutputStream with the file to be replaced and opens it. You should use
|
||||
\helpref{IsOk}{wxstreambaseisok} to verify if the constructor succeeded.
|
||||
|
||||
Call \helpref{Commit()}{wxtempfileoutputstreamcommit} or \helpref{Close()}{wxoutputstreamclose} to
|
||||
replace the old file and close this one. Calling \helpref{Discard()}{wxtempfileoutputstreamdiscard}
|
||||
(or allowing the destructor to do it) will discard the changes.
|
||||
|
||||
|
||||
\membersection{wxTempFileOutputStream::Commit}\label{wxtempfileoutputstreamcommit}
|
||||
|
||||
\func{bool}{Commit}{\void}
|
||||
|
||||
Validate changes: deletes the old file of the given name and renames the new
|
||||
file to the old name. Returns {\tt true} if both actions succeeded. If {\tt 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.
|
||||
|
||||
|
||||
\membersection{wxTempFileOutputStream::Discard}\label{wxtempfileoutputstreamdiscard}
|
||||
|
||||
\func{void}{Discard}{\void}
|
||||
|
||||
Discard changes: the old file contents are not changed, the temporary file is
|
||||
deleted.
|
Reference in New Issue
Block a user