Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.
Platforms to show: All Mac Windows Linux Cross-Platform
ArchiveWriterMBS class
Super class: ArchiverMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | Console & Web | iOS |
class | Archive | MBS Compression Plugin | 16.2 | Yes | Yes | Yes | Yes | No |
Example:
dim a as new ArchiveWriterMBS
a.SetFormatZip
a.ZipSetCompressionDeflate
dim f as FolderItem = SpecialFolder.Desktop.Child("test.zip")
if not a.CreateFile(f) then
break // failed
else
dim data as string = "Hello World test file. Hello World again."
dim e as new ArchiveEntryMBS
e.PathName = "Hello World.txt"
e.Size = lenb(data)
e.Permissions = &o0644
e.FileType = e.kFileTypeRegular
a.WriteHeader e
call a.WriteData data
a.FinishEntry
a.Close
end if
Can be used to write zip, tar and other image formats.
Subclass of the ArchiverMBS class.
- 51 methods
- method AddFilter(FilterCode as Integer)
- method AddFilterB64encode
- method AddFilterByName(Name as String)
- method AddFilterBZip2
- method AddFilterCompress
- method AddFilterGRZip
- method AddFilterGZip
- method AddFilterLRZip
- method AddFilterLZ4
- method AddFilterLZip
- method AddFilterLZMA
- method AddFilterLZOp
- method AddFilterNone
- method AddFilterProgram(Command as String)
- method AddFilterUUEncode
- method AddFilterXZ
- method Close
- method Constructor
- method CreateFile(File as FolderItem) as boolean
- method Destructor
- method Fail
- method FinishEntry
- method SetFormat(FormatCode as Integer)
- method SetFormat7Zip
- method SetFormatArBsd
- method SetFormatArSvr4
- method SetFormatByExtension(FileName as String, defaultExtension as String = "")
- method SetFormatByName(Name as String)
- method SetFormatCpio
- method SetFormatCpioNewc
- method SetFormatGnutar
- method SetFormatIso9660
- method SetFormatMTree
- method SetFormatMTreeClassic
- method SetFormatPax
- method SetFormatPaxRestricted
- method SetFormatRaw
- method SetFormatShar
- method SetFormatSharDump
- method SetFormatUstar
- method SetFormatV7tar
- method SetFormatWArc
- method SetFormatXar
- method SetFormatZip
- method SetPassphrase(Password as String)
- method WriteData(data as MemoryBlock) as Int64
- method WriteData(data as Ptr, Size as Int64) as Int64
- method WriteData(data as string) as Int64
- method WriteHeader(Entry as ArchiveEntryMBS)
- method ZipSetCompressionDeflate
- method ZipSetCompressionStore
Super class ArchiverMBS
- event Passphrase(byref password as String) as Boolean
- 3 properties
- 7 shared properties
- shared property BZLibVersion as String
- shared property LibVersion as Integer
- shared property LibVersionDetails as String
- shared property LibVersionString as String
- shared property LZ4Version as String
- shared property LzmaVersion as String
- shared property ZLibVersion as String
- 2 methods
- method Constructor
- method Destructor
- 2 shared methods
- shared method NewReader as ArchiveReaderMBS
- shared method NewWriter as ArchiveWriterMBS
- 51 constants
This class has no sub classes.
Some methods using this class:
- ArchiverMBS.NewWriter as ArchiveWriterMBS
Some examples which use this class:
The items on this page are in the following plugins: MBS Compression Plugin.
Links
MBS Xojo tutorial videos