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

84
Visualizações
Why is NW.SHELL only wokring in root DIR of app?

For some reason NW.SHELL fuctions are only working for files in root folder of my app. It wont let me use an absolute path or a relative path. Example "/relative/path/text.txt" or D:/relative/path/text.txt however text.txt will work with NW.SHELL function as long as the text file is in the same root DIR obviously.

This applies to both of these. What can i do to get relative or absolute paths to work? preferably relative paths. The nature of my program relative would be most functional.

nw.Shell.showItemInFolder('test.txt');
nw.Shell.openItem('test.txt');
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Using version 0.65.0 of NW.js, it does work with absolute paths.

const path = require('path');
nw.Shell.openItem(path.resolve('./test.txt'));

If that doesn't work, test.txt is not in the current working directory.

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