Unpack files
Extract selected files from the tar archive by the list of paths
- Parameters
- Advanced call ?
Function UnpackFiles(Val Archive, Val Paths, Val DestinationDirectory = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Archive | --src | String, BinaryData | ✔ | Path to the archive on disk or binary data |
| Paths | --paths | Array Of String | ✔ | Full paths of files inside the archive |
| DestinationDirectory | --dest | String | ✖ | Directory path for unpacking. To binary data if not filled |
Returns
Map Of KeyAndValue - Information about the execution or description of selected files
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Parameters with Binary data type can also accept file paths on disk and URLs
1C:Enterprise/OneScript code example
ArchivePath = Parameters["Tar_ArchivePath"];
DestinateDirectory = Parameters["Tar_DestDir"];
Paths = Parameters["Tar_PartialPaths"];
Result = OPI_Tar.UnpackFiles(ArchivePath, Paths, DestinateDirectory);
- Bash
- CMD/Bat
oint tar UnpackFiles \
--src "/tmp/qcndyrb1.h2f" \
--paths "['readme.txt','docs/note.txt']"
oint tar UnpackFiles ^
--src "/tmp/qcndyrb1.h2f" ^
--paths "['readme.txt','docs/note.txt']"
Result
{
"result": true
}