Files
odfstudio/wizards/source/scriptforge/python
Jean-Pierre Ledure 2821d29a87 ScriptForge (FileSystem) Manage ZIP archives
The FileSystem service provides simple
methods to manage compressed zip archives.

As an example, .odf and .oxt files being
formatted as such archives, massive or
punctual changes of file contents
with smart scripts can be facilitated.

New methods:
- IsZipFile(filename)
    returns True when filename is a valid
    zip file
- FilesInZip(filename, pattern)
    returns a list of archive members,
    optionally filtered with a Like pattern,
    stored in filename
- ExtractFromZip(filename, destination, source)
    stores the source file(s) found in the
    given ZIP file into a destination folder
- CompressToZip(filename, foldername, rootfolder)
    stores the content of folder, including
    its subfolders, into a zip archive,
    optionally under a root folder

The implementation is based on the python
zipfile standard library.

The methods area available both for Basic and
Python user scripts. For Python scripts, the
user is also free to use the native zipfile
library instead.

The user documentation shouid be updated
according to this commit.

Change-Id: I506a8583dc3fa38c7e05094562ade33f84a24747
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211891
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2026-10-07 14:26:54 +02:00
..