Get list of files
Gets a hierarchical list of files and directories in the archive
- Parameters
- Advanced call ?
Function GetFilesList(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 - Information about files in the archive
| 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.GetFilesList(ArchivePath);
- Bash
- CMD/Bat
oint rar GetFilesList \
--src "/tmp/jpo1dq3i.lwb"
oint rar GetFilesList ^
--src "/tmp/jpo1dq3i.lwb"
Result
{
"entries": [
{
"directory": true,
"entries": [
{
"directory": false,
"name": "settings.json",
"size": 17
}
],
"name": "config"
},
{
"directory": true,
"entries": [
{
"directory": true,
"entries": [
{
"directory": false,
"name": "payload.bin",
"size": 5
}
],
"name": "nested"
}
],
"name": "data"
},
{
"directory": true,
"entries": [
{
"directory": false,
"name": "note.txt",
"size": 20
}
],
"name": "docs"
},
{
"directory": false,
"name": "readme.txt",
"size": 21
}
]
}