Xojo Conferences

« FileMaker conferences… | Home | MBS FileMaker Plugin … »

New Archive classes for handling zip and tar archives

We got new classes for handling archives using libarchive. The new ArchiveReaderMBS class can read an archive and you can easily extract file information and content. The ArchiveWriterMBS class can write archives. Both classes read/write in chunks and process archives serially. Compression is supported with zip (deflate) and bzip2 compression. Here an example for going over any supported archive format and read the file names:
dim a as new ArchiveReaderMBS

// 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
24 05 16 - 10:56
No comments

Remember personal info?

Emoticons / Textile

Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.