Usage of Files API (OC API in general)

I started tinkering with Nextcloud and want to write an app that moves folder/files automatically.
This aims especially at shared folders that simply show up in the root directory (I know there is an option to use another folder, but that doesn’t solve the problem).
As shared folders are implemented through the db, filesystem operations are not applicable for this problem.

Long story short: I scanned the code of Files app and found the method it uses to move files - OC.Files.Client.move()
As this is not part of the public API and not really documented, my question is, how save it is to use this method.
I mean, may new version simply break this or is it somewhat stable?
Or do you know of a better option to do this?


1 Like

Hi, If someone is still looking for a solution, take a look at my answer for this forum post.

Another hint: Download the nextcloud-server repository from github, install php on your machine and open the project with PHPstorm or some other IDE. Now you can use the implemented documentation in the code and the links available via the IDE to get all the necessary information about the API and the available functions. This worked really well for me to develop the app mentioned in the linked forum post.

1 Like