I am trying to do the following with Nextcloud and PHP and googling didn't yield any results:
I have a Folderstructure like so:
Parent
--> Child1
--> Child2
File1
File2
File3
--> Child3
File1
File2
--> SubChild1
File1
File2
-->SubSubchild1
File1
So it's a lot of folders and files, sometimes 1 level deep, sometimes empty and sometimes several levels deep.
I need to generate a list in PHP of all the shared folders withe their shared files and subfolders.
So far I have only succeeded in getting Nextcloud to show me all the subfolders and files of on folder. In my example above I could see the contents of Child3 (File1, File2 and Subchild1) but not the contens of SubChild1. I did this by using:
https://my-nextcloud.instance//ocs/v2.php/apps/files_sharing/api/v1/shares?format=json&path=Parent/Child3&subfiles=true
That would mean that I had to make a curl-call to the API for every Subfolder I have... that makes this very clumsy and slow... especially since I don`t know how deep the folder-structure will go in the future....
Are there any better ways? What am I missing? Any help or pointers in the right direction would be greatly appreciated!