List the files and folders in a specified path
List the files and folders in a specified path by using the GetFolderItemsForPath method.
Examples
Example 1:
The client sends:
{
"jsonrpc": "2.0",
"id": 0,
"method": "GetFolderItemsForPath",
"handle": -1,
"params": [
"E:\\\\GIT\\\\engine-sense-fork\\\\prod\\\\data\\\\Engine\\\\test\\\\qlikviewTests\\\\ProtocolTester4Net\\\\TestData\\\\"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"qFolderItems": [
{
"qName": "AggrScriptFunc.qvf",
"qType": "FILE"
},
{
"qName": "alternatestate_simple.qvf",
"qType": "FILE"
},
{
"qName": "CustomData",
"qType": "FOLDER"
},
{
"qName": "CustomScript",
"qType": "FOLDER"
}
]
}
}
The files and folders located at the specified path are returned.
Example 2:
In Qlik Sense Desktop, the relative path is related to the default Apps folder located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.
The client sends:
{
"jsonrpc": "2.0",
"id": 0,
"method": "GetFolderItemsForPath",
"handle": -1,
"params": [
"..\\.."
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"qFolderItems": [
{
"qName": "Examples",
"qType": "FOLDER"
},
{
"qName": "QlikView",
"qType": "FOLDER"
},
{
"qName": "Sense",
"qType": "FOLDER"
},
{
"qName": "Tutorial source",
"qType": "FOLDER"
}
]
}
}
The files and folders located at the specified path are returned.
Example 3:
In Qlik Sense Desktop, the relative path is related to the default Apps folder located in C:\Users\<user name>\Documents\Qlik\Sense\Apps.
The client sends:
{
"jsonrpc": "2.0",
"id": 0,
"method": "GetFolderItemsForPath",
"handle": -1,
"params": [
"NewFolder"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"qFolderItems": [
{
"qName": "NewFolder1",
"qType": "FOLDER"
},
{
"qName": "NewFolder2",
"qType": "FOLDER"
},
{
"qName": "StoreCountryLibConn.txt",
"qType": "FILE"
},
{
"qName": "unicode.qvs",
"qType": "FILE"
}
]
}
}
The files and folders located at the specified path are returned.