⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tarstrm.tex

📁 很牛的GUI源码wxWidgets-2.8.0.zip 可在多种平台下运行.
💻 TEX
📖 第 1 页 / 共 2 页
字号:
\membersection{wxTarEntry::operator=}\label{wxtarentryoperatorassign}\func{wxTarEntry\& operator}{operator=}{\param{const wxTarEntry\& }{entry}}Assignment operator.%% automatically generated by HelpGen $Revision: 1.2 $ from% wx/tarstrm.h at 28/Oct/06 18:27:02%\section{\class{wxTarInputStream}}\label{wxtarinputstream}Input stream for reading tar files.\helpref{GetNextEntry()}{wxtarinputstreamgetnextentry} returns an \helpref{wxTarEntry}{wxtarentry} object containing the meta-datafor the next entry in the tar (and gives away ownership). Reading fromthe wxTarInputStream then returns the entry's data. Eof() becomes trueafter an attempt has been made to read past the end of the entry's data.When there are no more entries, GetNextEntry() returns NULL and sets Eof().Tar entries are seekable if the parent stream is seekable. In practice thisusually means they are only seekable if the tar is stored as a local file andis not compressed.\wxheading{Derived from}\helpref{wxArchiveInputStream}{wxarchiveinputstream}\wxheading{Include files}<wx/tarstrm.h>\wxheading{Data structures}\begin{verbatim}typedef wxTarEntry entry_type\end{verbatim}\helpref{Archive formats such as zip}{wxarc}\\\helpref{wxTarEntry}{wxtarentry}\\\helpref{wxTarOutputStream}{wxtaroutputstream}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxTarInputStream::wxTarInputStream}\label{wxtarinputstreamwxtarinputstream}\func{}{wxTarInputStream}{\param{wxInputStream\& }{stream}, \param{wxMBConv\& }{conv = wxConvLocal}}\func{}{wxTarInputStream}{\param{wxInputStream* }{stream}, \param{wxMBConv\& }{conv = wxConvLocal}}Constructor. In a Unicode build the second parameter {\it conv} isused to translate fields from the standard tar header into Unicode. It hasno effect on the stream's data. {\it conv} is only used for the standardtar headers, any pax extended headers are always UTF-8 encoded.If the parent stream is passed as a pointer then the new filter streamtakes ownership of it. If it is passed by reference then it does not.\membersection{wxTarInputStream::CloseEntry}\label{wxtarinputstreamcloseentry}\func{bool}{CloseEntry}{\void}Closes the current entry. On a non-seekable stream reads to the end ofthe current entry first.\membersection{wxTarInputStream::GetNextEntry}\label{wxtarinputstreamgetnextentry}\func{wxTarEntry*}{GetNextEntry}{\void}Closes the current entry if one is open, then reads the meta-data forthe next entry and returns it in a \helpref{wxTarEntry}{wxtarentry}object, giving away ownership. The stream is then open and can be read.\membersection{wxTarInputStream::OpenEntry}\label{wxtarinputstreamopenentry}\func{bool}{OpenEntry}{\param{wxTarEntry\& }{entry}}Closes the current entry if one is open, then opens the entry specifiedby the {\it entry} object.{\it entry} should be from the same tar file, and the tar shouldbe on a seekable stream.\wxheading{See also}\helpref{Looking up an archive entry by name}{wxarcbyname}%% automatically generated by HelpGen $Revision: 1.2 $ from% wx/tarstrm.h at 28/Oct/06 18:27:02%\section{\class{wxTarOutputStream}}\label{wxtaroutputstream}Output stream for writing tar files.\helpref{PutNextEntry()}{wxtaroutputstreamputnextentry} is used to createa new entry in the output tar, then the entry's data is written to thewxTarOutputStream. Another call to PutNextEntry() closes the currententry and begins the next.\wxheading{Derived from}\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}\wxheading{Include files}<wx/tarstrm.h>\wxheading{Data structures}Constants for the {\it format} parameter of the \helpref{constructor}{wxtaroutputstreamwxtaroutputstream}.\begin{verbatim}// Archive Formats (use wxTAR_PAX, it's backward compatible)enum wxTarFormat{    wxTAR_USTAR,                // POSIX.1-1990 tar format    wxTAR_PAX                   // POSIX.1-2001 tar format};\end{verbatim}\wxheading{See also}\helpref{Archive formats such as zip}{wxarc}\\\helpref{wxTarEntry}{wxtarentry}\\\helpref{wxTarInputStream}{wxtarinputstream}\latexignore{\rtfignore{\wxheading{Members}}}\membersection{wxTarOutputStream::wxTarOutputStream}\label{wxtaroutputstreamwxtaroutputstream}\func{}{wxTarOutputStream}{\param{wxOutputStream\& }{stream}, \param{wxTarFormat }{format = wxTAR\_PAX}, \param{wxMBConv\& }{conv = wxConvLocal}}\func{}{wxTarOutputStream}{\param{wxOutputStream* }{stream}, \param{wxTarFormat }{format = wxTAR\_PAX}, \param{wxMBConv\& }{conv = wxConvLocal}}If the parent stream is passed as a pointer then the new filter streamtakes ownership of it. If it is passed by reference then it does not.In a Unicode build the third parameter {\it conv} is used to translate theheaders fields into an 8-bit encoding. It has no effect on the stream's data.When the {\it format} is {\it wxTAR\_PAX}, pax extended headers are generatedwhen any header field will not fit the standard tar header block or if ituses any non-ascii characters.Extended headers are stored as extra 'files' within the tar, and will beextracted as such by any other tar program that does not understand them.The {\it conv} parameter only affect the standard tar headers, the extendedheaders are always UTF-8 encoded.When the {\it format} is {\it wxTAR\_USTAR}, no extended headers aregenerated, and instead a warning message is logged if any header fieldoverflows.\membersection{wxTarOutputStream::\destruct{wxTarOutputStream}}\label{wxtaroutputstreamdtor}\func{}{\destruct{wxTarOutputStream}}{\void}The destructor calls \helpref{Close()}{wxtaroutputstreamclose} to finishwriting the tar if it has not been called already.\membersection{wxTarOutputStream::Close}\label{wxtaroutputstreamclose}\func{bool}{Close}{\void}Finishes writing the tar, returning true if successful.Called by the destructor if not called explicitly.\membersection{wxTarOutputStream::CloseEntry}\label{wxtaroutputstreamcloseentry}\func{bool}{CloseEntry}{\void}Close the current entry. It is called implicitly whenever another newentry is created with \helpref{CopyEntry()}{wxtaroutputstreamcopyentry}or \helpref{PutNextEntry()}{wxtaroutputstreamputnextentry}, orwhen the tar is closed.\membersection{wxTarOutputStream::CopyArchiveMetaData}\label{wxtaroutputstreamcopyarchivemetadata}\func{bool}{CopyArchiveMetaData}{\param{wxTarInputStream\& }{s}}See \helpref{wxArchiveOutputStream::CopyArchiveMetaData}{wxarchiveoutputstreamcopyarchivemetadata}.For the tar format this function does nothing.\membersection{wxTarOutputStream::CopyEntry}\label{wxtaroutputstreamcopyentry}\func{bool}{CopyEntry}{\param{wxTarEntry* }{entry}, \param{wxTarInputStream\& }{inputStream}}Takes ownership of {\it entry} and uses it to create a new entryin the tar. {\it entry} is then opened in {\it inputStream} and its contentscopied to this stream.For some other archive formats CopyEntry() is much more efficient thantransferring the data using Read() and Write() since it will copy themwithout decompressing and recompressing them. For tar however it makesno difference.For tars on seekable streams, {\it entry} must be from the same tar fileas {\it stream}. For non-seekable streams, {\it entry} must also be thelast thing read from {\it inputStream}.\membersection{wxTarOutputStream::Get/SetBlockingFactor}\label{wxtaroutputstreamblockingfactor}\constfunc{int}{GetBlockingFactor}{\void}\func{void}{SetBlockingFactor}{\param{int }{factor}}The tar is zero padded to round its size up to {\it BlockingFactor * 512} bytes.Defaults to 10 for {\it wxTAR\_PAX} and 20 for {\it wxTAR\_USTAR}(see the \helpref{constructor}{wxtaroutputstreamwxtaroutputstream}), asspecified in the POSIX standards.\membersection{wxTarOutputStream::PutNextDirEntry}\label{wxtaroutputstreamputnextdirentry}\func{bool}{PutNextDirEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}}Create a new directory entry(see \helpref{wxArchiveEntry::IsDir()}{wxarchiveentryisdir})with the given name and timestamp.\helpref{PutNextEntry()}{wxtaroutputstreamputnextentry} canalso be used to create directory entries, by supplying a name witha trailing path separator.\membersection{wxTarOutputStream::PutNextEntry}\label{wxtaroutputstreamputnextentry}\func{bool}{PutNextEntry}{\param{wxTarEntry* }{entry}}Takes ownership of {\it entry} and uses it to create a new entryin the tar. \func{bool}{PutNextEntry}{\param{const wxString\& }{name}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}, \param{wxFileOffset }{size = wxInvalidOffset}}Create a new entry with the given name, timestamp and size.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -