How to read and write files from PHP app?

I’m trying to read and write files from the Nextcloud data store, from a PHP app. I’ve created the app, got basic routing to work, but I can’t find any info on how to access files.

How would I do that from a controller? Is there some examples or documentation somewhere that I could look at?

Ok seems Nextcloud app development is dead. Doesn’t give much confidence in the platform. Anyway, if anyone stumbles upon this post, the way to access filesystem is described there:

@laurent You were asking what?

@laurent Are we on the same page here? What is the basis of your apparent presumptions?

Some NC server releases / dev activities as of yesterday:

Some recent NC desktop release for all platforms:

Apparently some misunderstanding, I presume.

Could you please consider to rephrase?

I was talking specifically of the activity around app development. There’s not many people answering app dev questions and doesn’t seem to be a big community around it.

I follow the server development as well and i know it’s quite active, which is great.

Sorry if I didn’t formulate what I meant properly.

I’m curious. Does it work for you?

Yes I got it working the way I needed eventually. Code is there if that can help: