Skip to main content

Get metadata

Gets metadata and a flat list of archive files

Function GetMetadata(Val Archive) Export

ParameterCLI optionTypeRequiredDescription
Archive--srcString, BinaryDataPath to the archive on disk or binary data
Returns

Map Of KeyAndValue - Archive information

tip

Parameters with Binary data type can also accept file paths on disk and URLs


1C:Enterprise/OneScript code example
ArchivePath = Parameters["Tar_ArchivePath"];

Result = OPI_Tar.GetMetadata(ArchivePath);
oint tar GetMetadata \
--src "/tmp//opi_tar_meta_63920080138492/archive_gzip.tar.gz"
Result
{
"archive_size": 3072,
"directory_count": 0,
"entries": [
{
"directory": false,
"gid": 0,
"modified_time": 1784480864,
"name": "docs/note.txt",
"size": 11,
"uid": 0
},
{
"directory": false,
"gid": 0,
"modified_time": 1784480864,
"name": "readme.txt",
"size": 17,
"uid": 0
}
],
"entry_count": 2,
"file_count": 2,
"unpacked_size": 28
}