Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
Access directories which look like files on Mac

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?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This is working as intended. If you try to create a folder named test.txt on a Mac, the Finder even helpfully warns you about the issue you are experiencing:

Are you sure you want to add the extensions ".txt" to the end of the name? If you make this change, your folder may appear as a single file.

Finder warning: Are you sure you want to add the extensions ".txt" to the end of the name? If you make this change, your folder may appear as a single file.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!