Get metadata
Gets metadata and a flat list of archive files
- Parameters
- Advanced call ?
Function GetMetadata(Val Archive, Val Password = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Archive | --src | String, BinaryData | ✔ | Path to the archive on disk or binary data |
| Password | --password | String | ✖ | archive password, if required |
Returns
Map Of KeyAndValue - Archive information
| 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["RAR_ArchivePath"];
Result = OPI_RAR.GetMetadata(ArchivePath);
- Bash
- CMD/Bat
oint rar GetMetadata \
--src "/tmp/vvz2puf5.zqk"
oint rar GetMetadata ^
--src "/tmp/vvz2puf5.zqk"
Result
{
"archive_size": 426,
"directory_count": 4,
"entries": [
{
"directory": false,
"name": "readme.txt",
"size": 21
},
{
"directory": false,
"name": "docs/note.txt",
"size": 20
},
{
"directory": false,
"name": "data/nested/payload.bin",
"size": 5
},
{
"directory": false,
"name": "config/settings.json",
"size": 17
},
{
"directory": true,
"name": "data/nested",
"size": 0
},
{
"directory": true,
"name": "docs",
"size": 0
},
{
"directory": true,
"name": "data",
"size": 0
},
{
"directory": true,
"name": "config",
"size": 0
}
],
"entry_count": 8,
"file_count": 4,
"unpacked_size": 63
}