Expand Resource
Synopsis
Extracts ZIP archives to a destination directory. Verifies whether the destination contains all files from the archive with matching checksums.
Type
Capabilities
- Get
- Set
- Test
Properties
archivePath
Path to the ZIP archive file.
destinationPath
Destination directory to extract into.
_inDesiredState
Whether the destination matches the archive contents.
Examples
Example 1 — Extract a ZIP archive
Example 2 — Check extraction state
Example 3 — Configuration document
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Deploy application package
type: OpenDsc.Archive.Zip/Expand
properties:
archivePath: /packages/myapp-v2.0.zip
destinationPath: /opt/myapp
Exit codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error |
| 2 | Invalid JSON |
| 3 | Archive not found |
| 4 | Invalid argument |
| 5 | IO error |
| 6 | Invalid or corrupt archive |