When calling either listfolder or stat according to the documentation the metadata should include the path to the file or folder:
{
"result": 0,
"metadata": {
"ismine": true,
"id": "f1729212",
"created": "Wed, 02 Oct 2013 14:29:11 +0000",
"modified": "Wed, 02 Oct 2013 14:29:11 +0000",
"hash": 10681749967730527559,
"isshared": false,
"isfolder": false,
"category": 1,
"parentfolderid": 0,
"icon": "image",
"fileid": 1729212,
"height": 600,
"width": 900,
"path": "\/Simple image.jpg",
"name": "Simple image.jpg",
"contenttype": "image\/jpeg",
"size": 73269,
"thumb": true
}
}
However, the API is only returning path when the calling listfolder with RemoteFolder.ROOT_FOLDER_ID:
{
"metadata": {
"path": "/",
"name": "/",
"created": "Sun, 05 Jul 2020 04:31:40 +0000",
"ismine": true,
"thumb": false,
"modified": "Sun, 05 Jul 2020 04:31:40 +0000",
"id": "d0",
"isshared": false,
"icon": "folder",
"isfolder": true,
"folderid": 0,
"contents": [
{
"name": "AndroidTest",
"created": "Tue, 16 Mar 2021 15:49:19 +0000",
"ismine": true,
"thumb": false,
"modified": "Sat, 20 Mar 2021 13:48:14 +0000",
"comments": 0,
"id": "d546891853",
"isshared": false,
"icon": "folder",
"isfolder": true,
"parentfolderid": 0,
"folderid": 546891853,
},
[..]
]
}
}
listfolder of non root folderid:
{
"metadata": {
"name": "AndroidTest",
"created": "Tue, 16 Mar 2021 15:49:19 +0000",
"ismine": true,
"thumb": false,
"modified": "Sat, 20 Mar 2021 13:48:14 +0000",
"comments": 0,
"id": "d546891853",
"isshared": false,
"icon": 20,
"isfolder": true,
"parentfolderid": 0,
"folderid": 546891853,
"contents": [
{
"name": "TestVault",
"created": "Tue, 16 Mar 2021 21:17:47 +0000",
"ismine": true,
"thumb": false,
"modified": "Tue, 16 Mar 2021 21:35:09 +0000",
"comments": 0,
"id": "d547917979",
"isshared": false,
"icon": 20,
"isfolder": true,
"parentfolderid": 546891853,
"folderid": 547917979
},
[..]
]
}
}
I already prepared exposing path and would have opened a PR but if this is the inteded behaviour, my PR would be pointless.
EDIT
Just realized that it is only returend when actually calling listfolder / stat with path.
Is this something you might be able to provide also when calling with IDs?
When calling either
listfolderorstataccording to the documentation themetadatashould include thepathto the file or folder:stat: https://docs.pcloud.com/methods/file/stat.htmllistfolder: https://docs.pcloud.com/methods/folder/listfolder.htmlHowever, the API is only returning
pathwhen the callinglistfolderwithRemoteFolder.ROOT_FOLDER_ID:listfolderof non root folderid:I already prepared exposing
pathand would have opened a PR but if this is the inteded behaviour, my PR would be pointless.EDIT
Just realized that it is only returend when actually calling
listfolder/statwithpath.Is this something you might be able to provide also when calling with
IDs?