Module libcompress
Provides a class to automate compression of multiple files
Functions
LZArchive () | The LZArchive class |
LZArchive:init (compressed_data) | Constructor for the LZArchive class |
LZArchive:file (file_path, file_content) | Sets or returns the file content |
LZArchive:get_files (filter_pattern) | Returns the file names matched to the option filter pattern |
LZArchive:get_archive () | Compresses the added files and returns the completed archive |
Functions
- LZArchive ()
- The LZArchive class
- LZArchive:init (compressed_data)
-
Constructor for the LZArchive class
Parameters:
- compressed_data (Optional) Compressed data to decompress
- LZArchive:file (file_path, file_content)
-
Sets or returns the file content
Parameters:
- file_path The file path to look up
- file_content (Optional) Content to set for the file path
Returns:
-
Returns the file path uncompressed content
- LZArchive:get_files (filter_pattern)
-
Returns the file names matched to the option filter pattern
Parameters:
- filter_pattern The glob pattern for filtering
Returns:
-
Returns an array of file paths
- LZArchive:get_archive ()
-
Compresses the added files and returns the completed archive
Returns:
-
Returns the compressed archive content