plugin Nextcloud provides a service for listing the folders and files in a user's Nextcloud.
To use it, simply add this service to your page.
If the user has already linked his Ametys account with his Nextcloud account, he will see the contents of his Nextcloud directory directly.
Otherwise, users are invited to link their Nextcloud account to Ametys by clicking on the connect button. This opens a Nextcloud popup informing them that they are about to authorize Ametys to access their Nextcloud data. Ask him to authenticate himself. Then confirm the connection. Once the process is complete, the page will reload and the user will find himself as a Nextcloud-linked user.