Even if a user picks a folder with the Picker, the add-on can't read files that have
not been created by the add-on.
What it does allow is to determine whether the folder exists, and creating new files in that folder.
In other words, picking the folder gives the add-on write access to that folder, but not read access to files that were not created by the add-on.
If your add-on needs to list/search for files that the add-on has not created, then I don't know if there is an alternative for you.
The only possible solutions that I can think of are:
- Open source the code and provide instructions to users about how to install
- OR provide a template file with a bound script.
- The user copies your template file
- The user runs the code from their account
- OR have the user create a Web App on their account that your add-on can interact with
- Win the lottery pay - pay the security assessment fee.
The first 3 of those possible solutions require the user to do set-up which they may or may not be willing or able to do.