I am creating a script for Chrome browser to handle files (using File System Access API). This is totally fine on Windows, but on MAC I have this issue:
The files are stored in folders which look like files on MAC. For example folder name is thisisfolder.xyz and inside there are files like file.xml.
thisisfolder.xyz
file.xml
file2.xml
...
If I choose directory handler (handle.getDirectoryHandle(someDirectory)), those folders (thisisfolder.xyz) are greyed out and can't be selected. If I choose file handler (handle.getFileHandle(someDirectories)), I can select thisisfolder.xyz and similar, but later when I want to access files in this folder, I can't, because API thinks those folders are files.
var subdirHandle = await handle.getDirectoryHandle(someDirectory);
for await (var [name, entry] of subdirHandle.entries()) {
...
}
Do I have any possibility here?
This is working as intended. If you try to create a folder named
test.txton a Mac, the Finder even helpfully warns you about the issue you are experiencing: