fileZipDirPassword

Compresses an entire directory into a password-protected ZIP archive. Takes a source directory path, ZIP file path, and password. Returns 1 on success, 0 on failure (NULL parameters or ZIP creation error).

File IO

Parameters & Returns

Parameters

sourceDir String
zipFile String
password String

Returns

Int

Quick Summary

Compresses an entire directory into a password-protected ZIP archive. Takes a source directory path, ZIP file path, and password. Returns 1 on success, 0 on failure (NULL parameters or ZIP creation error).

Technical Exegesis...

Creates a password-protected ZIP archive containing all files and subdirectories from the source directory. Recursively traverses the directory tree and adds all contents with password encryption using MZ_DEFAULT_COMPRESSION. Returns 1 on success, 0 on failure (NULL parameters or ZIP creation error).

Uses miniz library (mz_zip_writer_add_mem_ex_v2) and AddDirToZipPassword helper function for recursion. Preserves directory structure within the ZIP. All files are encrypted with the same password.

Example

Example.bam
; No example implemented yet