zipstrm.tex
来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 714 行 · 第 1/2 页
TEX
714 行
%
% automatically generated by HelpGen $Revision: 1.10 $ from
% wx/zipstrm.h at 16/Sep/04 12:19:29
%
\section{\class{wxZipClassFactory}}\label{wxzipclassfactory}
Class factory for the zip archive format. See the base class
for details.
\wxheading{Derived from}
\helpref{wxArchiveClassFactory}{wxarchiveclassfactory}
\wxheading{Include files}
<wx/zipstrm.h>
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{Generic archive programming}{wxarcgeneric}
\helpref{wxZipEntry}{wxzipentry}\\
\helpref{wxZipInputStream}{wxzipinputstream}\\
\helpref{wxZipOutputStream}{wxzipoutputstream}
%
% automatically generated by HelpGen $Revision: 1.10 $ from
% wx/zipstrm.h at 16/Sep/04 12:19:29
%
\section{\class{wxZipEntry}}\label{wxzipentry}
Holds the meta-data for an entry in a zip.
\wxheading{Derived from}
\helpref{wxArchiveEntry}{wxarchiveentry}
\wxheading{Include files}
<wx/zipstrm.h>
\wxheading{Data structures}
Constants for \helpref{Get/SetMethod}{wxzipentrymethod}:
\begin{verbatim}
// Compression Method, only 0 (store) and 8 (deflate) are supported here
//
enum wxZipMethod
{
wxZIP_METHOD_STORE,
wxZIP_METHOD_SHRINK,
wxZIP_METHOD_REDUCE1,
wxZIP_METHOD_REDUCE2,
wxZIP_METHOD_REDUCE3,
wxZIP_METHOD_REDUCE4,
wxZIP_METHOD_IMPLODE,
wxZIP_METHOD_TOKENIZE,
wxZIP_METHOD_DEFLATE,
wxZIP_METHOD_DEFLATE64,
wxZIP_METHOD_BZIP2 = 12,
wxZIP_METHOD_DEFAULT = 0xffff
};
\end{verbatim}
Constants for \helpref{Get/SetSystemMadeBy}{wxzipentrysystemmadeby}:
\begin{verbatim}
// Originating File-System.
//
// These are Pkware's values. Note that Info-zip disagree on some of them,
// most notably NTFS.
//
enum wxZipSystem
{
wxZIP_SYSTEM_MSDOS,
wxZIP_SYSTEM_AMIGA,
wxZIP_SYSTEM_OPENVMS,
wxZIP_SYSTEM_UNIX,
wxZIP_SYSTEM_VM_CMS,
wxZIP_SYSTEM_ATARI_ST,
wxZIP_SYSTEM_OS2_HPFS,
wxZIP_SYSTEM_MACINTOSH,
wxZIP_SYSTEM_Z_SYSTEM,
wxZIP_SYSTEM_CPM,
wxZIP_SYSTEM_WINDOWS_NTFS,
wxZIP_SYSTEM_MVS,
wxZIP_SYSTEM_VSE,
wxZIP_SYSTEM_ACORN_RISC,
wxZIP_SYSTEM_VFAT,
wxZIP_SYSTEM_ALTERNATE_MVS,
wxZIP_SYSTEM_BEOS,
wxZIP_SYSTEM_TANDEM,
wxZIP_SYSTEM_OS_400
};
\end{verbatim}
Constants for \helpref{Get/SetExternalAttributes}{wxzipentryexternalattributes}:
\begin{verbatim}
// Dos/Win file attributes
//
enum wxZipAttributes
{
wxZIP_A_RDONLY = 0x01,
wxZIP_A_HIDDEN = 0x02,
wxZIP_A_SYSTEM = 0x04,
wxZIP_A_SUBDIR = 0x10,
wxZIP_A_ARCH = 0x20,
wxZIP_A_MASK = 0x37
};
\end{verbatim}
Constants for \helpref{Get/SetFlags}{wxzipentrygetflags}:
\begin{verbatim}
// Values for the flags field in the zip headers
//
enum wxZipFlags
{
wxZIP_ENCRYPTED = 0x0001,
wxZIP_DEFLATE_NORMAL = 0x0000, // normal compression
wxZIP_DEFLATE_EXTRA = 0x0002, // extra compression
wxZIP_DEFLATE_FAST = 0x0004, // fast compression
wxZIP_DEFLATE_SUPERFAST = 0x0006, // superfast compression
wxZIP_DEFLATE_MASK = 0x0006,
wxZIP_SUMS_FOLLOW = 0x0008, // crc and sizes come after the data
wxZIP_ENHANCED = 0x0010,
wxZIP_PATCH = 0x0020,
wxZIP_STRONG_ENC = 0x0040,
wxZIP_UNUSED = 0x0F80,
wxZIP_RESERVED = 0xF000
};
\end{verbatim}
\wxheading{See also}
\helpref{Archive formats such as zip}{wxarc}\\
\helpref{wxZipInputStream}{wxzipinputstream}\\
\helpref{wxZipOutputStream}{wxzipoutputstream}\\
\helpref{wxZipNotifier}{wxzipnotifier}
\wxheading{Field availability}
When reading a zip from a stream that is seekable,
\helpref{GetNextEntry()}{wxzipinputstreamgetnextentry} returns
a fully populated wxZipEntry object except for
\helpref{wxZipEntry::GetLocalExtra()}{wxzipentrylocalextra}. GetLocalExtra()
becomes available when the entry is opened, either by calling
\helpref{wxZipInputStream::OpenEntry}{wxzipinputstreamopenentry} or by
making an attempt to read the entry's data.
For zips on \helpref{non-seekable}{wxarcnoseek} streams, the following
fields are always available when GetNextEntry() returns:
\helpref{GetDateTime}{wxarchiveentrydatetime}\\
\helpref{GetInternalFormat}{wxarchiveentrygetinternalformat}\\
\helpref{GetInternalName}{wxzipentrygetinternalname}\\
\helpref{GetFlags}{wxzipentrygetflags}\\
\helpref{GetLocalExtra}{wxzipentrylocalextra}\\
\helpref{GetMethod}{wxzipentrymethod}\\
\helpref{GetName}{wxarchiveentryname}\\
\helpref{GetOffset}{wxarchiveentrygetoffset}\\
\helpref{IsDir}{wxarchiveentryisdir}
The following fields are also usually available when GetNextEntry()
returns, however, if the zip was also written to a non-seekable stream
the zipper is permitted to store them after the entry's data. In that
case they become available when the entry's data has been read to Eof(),
or \helpref{CloseEntry()}{wxarchiveinputstreamcloseentry} has been called.
{\tt (GetFlags() \& wxZIP\_SUMS\_FOLLOW) != 0} indicates that one or
more of these come after the data:
\helpref{GetCompressedSize}{wxzipentrygetcompressedsize}\\
\helpref{GetCrc}{wxzipentrygetcrc}\\
\helpref{GetSize}{wxarchiveentrysize}
The following are stored at the end of the zip, and become available
when the end of the zip has been reached, i.e. after GetNextEntry()
returns NULL and Eof() is true:
\helpref{GetComment}{wxzipentrycomment}\\
\helpref{GetExternalAttributes}{wxzipentryexternalattributes}\\
\helpref{GetExtra}{wxzipentryextra}\\
\helpref{GetMode}{wxzipentrymode}\\
\helpref{GetSystemMadeBy}{wxzipentrysystemmadeby}\\
\helpref{IsReadOnly}{wxarchiveentryisreadonly}\\
\helpref{IsMadeByUnix}{wxzipentryismadebyunix}\\
\helpref{IsText}{wxzipentryistext}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxZipEntry::wxZipEntry}\label{wxzipentrywxzipentry}
\func{}{wxZipEntry}{\param{const wxString\& }{name = wxEmptyString}, \param{const wxDateTime\& }{dt = wxDateTime::Now()}, \param{off\_t }{size = wxInvalidOffset}}
Constructor.
\func{}{wxZipEntry}{\param{const wxZipEntry\& }{entry}}
Copy constructor.
\membersection{wxZipEntry::Clone}\label{wxzipentryclone}
\constfunc{wxZipEntry*}{Clone}{\void}
Make a copy of this entry.
\membersection{wxZipEntry::Get/SetComment}\label{wxzipentrycomment}
\constfunc{wxString}{GetComment}{\void}
\func{void}{SetComment}{\param{const wxString\& }{comment}}
A short comment for this entry.
\membersection{wxZipEntry::GetCompressedSize}\label{wxzipentrygetcompressedsize}
\constfunc{off\_t}{GetCompressedSize}{\void}
The compressed size of this entry in bytes.
\membersection{wxZipEntry::GetCrc}\label{wxzipentrygetcrc}
\constfunc{wxUint32}{GetCrc}{\void}
CRC32 for this entry's data.
\membersection{wxZipEntry::Get/SetExternalAttributes}\label{wxzipentryexternalattributes}
\constfunc{wxUint32}{GetExternalAttributes}{\void}
\func{void}{SetExternalAttributes}{\param{wxUint32 }{attr}}
The low 8 bits are always the DOS/Windows file attributes for this entry.
The values of these attributes are given in the
enumeration {\tt wxZipAttributes}.
The remaining bits can store platform specific permission bits or
attributes, and their meaning depends on the value
of \helpref{SetSystemMadeBy()}{wxzipentrysystemmadeby}.
If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then the
high 16 bits are unix mode bits.
The following other accessors access these bits:
\helpref{IsReadOnly/SetIsReadOnly}{wxarchiveentryisreadonly}\\
\helpref{IsDir/SetIsDir}{wxarchiveentryisdir}\\
\helpref{Get/SetMode}{wxzipentrymode}
\membersection{wxZipEntry::Get/SetExtra}\label{wxzipentryextra}
\constfunc{const char*}{GetExtra}{\void}
\constfunc{size\_t}{GetExtraLen}{\void}
\func{void}{SetExtra}{\param{const char* }{extra}, \param{size\_t }{len}}
The extra field from the entry's central directory record.
The extra field is used to store platform or application specific
data. See Pkware's document 'appnote.txt' for information on its format.
\membersection{wxZipEntry::GetFlags}\label{wxzipentrygetflags}
\constfunc{int}{GetFlags}{\void}
Returns a combination of the bits flags in the enumeration {\tt wxZipFlags}.
\membersection{wxZipEntry::GetInternalName}\label{wxzipentrygetinternalname}
\constfunc{wxString}{GetInternalName}{\void}
Returns the entry's filename in the internal format used within the
archive. The name can include directory components, i.e. it can be a
full path.
The names of directory entries are returned without any trailing path
separator. This gives a canonical name that can be used in comparisons.
\func{wxString}{GetInternalName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}, \param{bool* }{pIsDir = NULL}}
A static member that translates a filename into the internal format used
within the archive. If the third parameter is provided, the bool pointed
to is set to indicate whether the name looks like a directory name
(i.e. has a trailing path separator).
\wxheading{See also}
\helpref{Looking up an archive entry by name}{wxarcbyname}
\membersection{wxZipEntry::Get/SetLocalExtra}\label{wxzipentrylocalextra}
\constfunc{const char*}{GetLocalExtra}{\void}
\constfunc{size\_t}{GetLocalExtraLen}{\void}
\func{void}{SetLocalExtra}{\param{const char* }{extra}, \param{size\_t }{len}}
The extra field from the entry's local record.
The extra field is used to store platform or application specific
data. See Pkware's document 'appnote.txt' for information on its format.
\membersection{wxZipEntry::Get/SetMethod}\label{wxzipentrymethod}
\constfunc{int}{GetMethod}{\void}
\func{void}{SetMethod}{\param{int }{method}}
The compression method. The enumeration {\tt wxZipMethod} lists the
possible values.
The default constructor sets this to wxZIP\_METHOD\_DEFAULT,
which allows \helpref{wxZipOutputStream}{wxzipoutputstream} to
choose the method when writing the entry.
\membersection{wxZipEntry::Get/SetMode}\label{wxzipentrymode}
\constfunc{int}{GetMode}{\void}
If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then
returns the unix permission bits stored in
\helpref{GetExternalAttributes()}{wxzipentryexternalattributes}.
Otherwise synthesises them from the DOS attributes.
\func{void}{SetMode}{\param{int }{mode}}
Sets the DOS attributes
in \helpref{GetExternalAttributes()}{wxzipentryexternalattributes}
to be consistent with the {\tt mode} given.
If \helpref{IsMadeByUnix()}{wxzipentryismadebyunix} is true then also
stores {\tt mode} in GetExternalAttributes().
Note that the default constructor
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?