File Manager: Access from sub-wikis and Velocity usage examples

Hello,

I am currently using the File Manager extension in XWiki and I have a few questions regarding its behavior in a multi-wiki environment.

  1. Access to files from sub-wikis
    If files are stored via the File Manager extension in the main wiki, is it possible to access them from all sub-wikis?
    Is there any specific configuration required to make these documents globally accessible?

  2. Accessing files in Velocity
    I would also like to know if there is a simple way to retrieve these files using Velocity scripts.
    More specifically, would you have an example of code that allows:

    • retrieving a file from the File Manager

    • or even better, listing and displaying all files contained in a given folder (for example inside a macro class)

If you have any example or code snippet to share, that would be greatly appreciated :slightly_smiling_face:

Thanks in advance for your help!