Browsers block access to certain folders for security reasons. For example if you granted a web page access to your entire Documents folder, the web page can access everything there - and a malicious page could then try to steal it all. To mitigate that you can't select the entire folder for certain sensitive folders like Desktop, Documents etc., but you can select a subfolder within them.
If you only need to open one file, then just use the open file picker anyway - the user can just choose themselves rather than having your project try to list all available files.