Skip to main content

Unpack files

Extract selected files from the tar archive by the list of paths

Function UnpackFiles(Val Archive, Val Paths, Val DestinationDirectory = "") Export

ParameterCLI optionTypeRequiredDescription
Archive--srcString, BinaryDataPath to the archive on disk or binary data
Paths--pathsArray Of StringFull paths of files inside the archive
DestinationDirectory--destStringDirectory path for unpacking. To binary data if not filled
Returns

Map Of KeyAndValue - Information about the execution or description of selected files

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);
oint tar UnpackFiles \
--src "/tmp/qcndyrb1.h2f" \
--paths "['readme.txt','docs/note.txt']"
Result
{
"result": true
}