OCP\Files\Folder

Hello,
could someone help me with access rights? I would like to use functions in OCP\Files\Folder for guests without login, but every time, without without logged user I got an error message on these functions, in case that user is logged in everything working well. Is there any way how to solve this? (for example use some user with minimum permission for guests etc.).
Thank you in advance for any advise/comment or solution.
Kind regards,
Bob