Trying to create a new file with "touch"

Iā€™m trying to dynamically create files through an app Iā€™m developing, but without success.

I attempted to use ServerContainer's getUserFolder's touch method. Interestingly, it does not throw any exception even though the file is not created. it simply does not create the file and returns NULL.

I checked to see if itā€™s a case of folder permission and does not seem to be, as I chmodā€™ed 777 the whole data folder just to find out if it was the case.

Iā€™m sharing here a fork of the ā€œnotestutorialā€ app with just a few changes trying to acomplish this:

This is where I learned about how files should be created. The branch above follows the instructed approach: https://docs.nextcloud.com/server/latest/developer_manual/app/storage/filesystem.html

Thanks in advance!

1 Like

I am having exact same issue. Does anyone has any solution?