nextcloud / documentation

📘 Nextcloud documentation
https://docs.nextcloud.com
Other
489 stars 1.72k forks source link

Add / Improve developer documentation for filesystem access #2161

Open jbreitung opened 4 years ago

jbreitung commented 4 years ago

Hi there,

as I already mentioned in my community post https://help.nextcloud.com/t/cannot-develop-own-backgroundtask-when-using-nextcloud-developer-documentation/83411/6 I really had some issues to get started with developing an Nextcloud App from scratch which needs access to the file system.

Finding out how to access the filesystem and how the access management is done by the filesystem API is really tricky. It was not clear for me to realize that a filesystem view is depending on a user and fetching files by e.g. their ID also depends on a users access rights. In my case I wanted to scan the filesystem which should not depend on a specific user. That was very complicated to find out how to do it…

It would also be very helpful for new Nextcloud App developers to get a basic “CRUD” based example about dealing with folders and files. If you haven’t done it before it is really hard to find out how it works and how the Nextcloud core API wants you to work with it.

sdrdis commented 4 years ago

I agree with this. I still struggle to understand how it works.