ArchiveReaderMBS class

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

ArchiveReaderMBS class

Super class: ArchiverMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Archive MBS Compression Plugin 16.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class to read archive content.
Example

dim a as new ArchiveReaderMBS
a.SupportFilterAll
a.SupportFormatAll
a.SetOptions "hdrcharset=UTF-8" // for unicode file names

// open file

dim f as FolderItem = SpecialFolder.Desktop.Child("test.zip")

if not a.OpenFile(f) then
Break // path invalid?
end if

dim e as ArchiveEntryMBS = a.NextHeader
while e <> nil

print e.PathName

e = a.NextHeader
wend

Can be used to read zip, tar and other image formats.
Subclass of the ArchiverMBS class.

Encryption Status constants.

Constant Value Description
kEncryptionDontKnow -1 If the reader for some other reason (e.g. not enough bytes read) cannot say if there are encrypted entries, kEncryptionDontKnow is returned.
kEncryptionUnsupported -2 In case the archive does not support encryption detection at all kEncryptionUnsupported is returned.

Extract Flags

Constant Value Description
kExtractACL &h20 Default: Do not restore ACLs.
kExtractClearNoChangeFFlags &h20000 Default: Do not clear no-change flags when unlinking object.
kExtractFileFlags &h40 Default: Do not restore fflags.
kExtractHFSCompressionForced &h8000 Default: Do not use HFS+ compression if it was not compressed.
This has no effect except on Mac OS v10.6 or later.
kExtractMacMetadata &h2000 Default: Do not restore Mac extended metadata.
This has no effect except on Mac OS.
kExtractNoAutoDir &h400 Default: Create parent directories as needed.
kExtractNoHFSCompression &h4000 Default: Use HFS+ compression if it was compressed.
This has no effect except on Mac OS v10.6 or later.
kExtractNoOverwrite 8 Default: Replace existing files.
kExtractNoOverwriteNewer &h800 Default: Overwrite files, even if one on disk is newer.
kExtractOwner 1 Default: Do not try to set owner/group.
kExtractPermission 2 Default: Do obey umask, do not restore SUID/SGID/SVTX bits.
kExtractSecureNoAbsolutePath &h10000 Default: Do not reject entries with absolute paths
kExtractSecureNoDotDot &h200 Default: Do not reject entries with '..' as path elements.
kExtractSecureSymLinks &h100 Default: Do not try to guard against extracts redirected by symlinks.
Note: With kExtractUnlink, will remove any intermediate symlink.
kExtractSparse &h1000 Detect blocks of 0 and write holes instead.
kExtractTime 4 Default: Do not restore mtime/atime.
kExtractUnlink &h10 Default: Try create first, unlink only if create fails with EEXIST.
kExtractXAttr &h80 Default: Do not restore xattrs.

Encryption Capabilities

Constant Value Description
kFormatCapabilitiesEncryptData 1 Reader can detect encrypted data.
kFormatCapabilitiesEncryptMetaData 2 Reader can detect encryptable metadata (pathname, mtime, etc.).
kFormatCapabilitiesNone 0 Current format supports no encryption.

Seek Modes

Constant Value Description
kSeekCur 1 Seek relative to current position.
kSeekEnd 2 Seek relative to end of file.
kSeekSet 0 Seek relative to begin of file.

Super class ArchiverMBS

Sub classes:

Some methods using this class:

Some examples using this class:

Blog Entries

Release notes


The items on this page are in the following plugins: MBS Compression Plugin.


ArchiveReadDiskMBS   -   ArchiverMBS


💬 Ask a question or report a problem