Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

138
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda