Creates an instance of SevenZip with optional compression settings.
Optionaloptions: Partial<ZipOptions>Partial zip options.
Generates the arguments for the 7-Zip command-line execution.
Gets the path to the 7-Zip executable.
Sets the destination path for the output .7z file.
The output file path.
The SevenZip instance for method chaining.
Sets the list of files and folders to be compressed.
An array of file or directory paths.
The SevenZip instance for method chaining.
Sets the compression level (1-9).
Compression level, where 1 is the fastest and 9 is the best compression.
The SevenZip instance for method chaining.
Enables overwrite mode, allowing an existing archive to be replaced.
The SevenZip instance for method chaining.
Sets a password for the archive.
The encryption password.
The SevenZip instance for method chaining.
Returns a string representation of the 7-Zip command with its arguments.
This method constructs the full command-line string that would be executed, ensuring that each argument is properly quoted to handle paths with spaces.
The formatted command-line string.
A wrapper class for creating 7-Zip archives using the command-line tool.
Example
For additional examples, see the sevenZipUnzip.test.ts or sevenZipUnzipSync.test.ts.