Trebejo.Compress.Zip (Trebejo v2.0.0)

Copy Markdown View Source

ZIP archive operations — create and extract.

Summary

Functions

Extracts a zip archive.

Creates a zip archive from source paths. Supports password.

Functions

unzip(file, opts \\ [])

@spec unzip(
  binary(),
  keyword()
) :: {:ok, binary()} | {:error, binary()}

Extracts a zip archive.

⚠️ Security: The password is passed via -P on the command line and is visible in the process list (ps aux). The unzip tool does not support reading passwords from stdin.

zip(output, files, opts \\ [])

@spec zip(binary(), [binary()], keyword()) :: {:ok, binary()} | {:error, binary()}

Creates a zip archive from source paths. Supports password.

⚠️ Security: The password is passed via -P on the command line and is visible in the process list (ps aux). The zip tool does not support reading passwords from stdin.