Skip to main content

Get metadata

Gets metadata and a flat list of archive files

Function GetMetadata(Val Archive, Val Password = "") Export

ParameterCLI optionTypeRequiredDescription
Archive--srcString, BinaryDataPath to the archive on disk or binary data
Password--passwordStringarchive password, if required
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["SevenZ_ArchivePath"];

Result = OPI_7z.GetMetadata(ArchivePath);
oint 7z GetMetadata \
--src "/tmp//opi_sevenz_meta_63920080162613/archive_lzma.7z"
Result
{
"archive_size": 218,
"block_count": 2,
"directory_count": 0,
"entries": [
{
"access_time": 1784480868,
"compressed_size": 15,
"crc": 531809357,
"creation_time": 1784480868,
"directory": false,
"has_stream": true,
"modified_time": 1784480868,
"name": "docs/note.txt",
"size": 11
},
{
"access_time": 1784480868,
"compressed_size": 20,
"crc": 992350456,
"creation_time": 1784480868,
"directory": false,
"has_stream": true,
"modified_time": 1784480868,
"name": "readme.txt",
"size": 16
}
],
"entry_count": 2,
"file_count": 2,
"packed_size": 35,
"solid": false,
"unpacked_size": 27
}