Skip to main content

Get list of files

Gets a hierarchical list of files and directories in the archive

Function GetFilesList(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 - Information about files in the archive

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);
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
}
]
}