How to access electron.app.getPath()?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



How to access electron.app.getPath()?



Hi I'm making a custom component under js/about. How can I make getPath() available inside my component? Brave components seem to have access to it(via const app = require('electron')) without requiring remote module.


js/about


getPath()


const app = require('electron')




1 Answer
1



If you want to access it from your main process this will be enough.


const app = require('electron');
app.getPath('exe');



However if you need it from the renderer process test this out.


const app = require('electron').remote;
app.getPath('exe');





It doesn't work. Even if it did I'd like it to be consistent with Brave's implementation -- that is no remote module.
– adredx
Aug 6 at 8:39






what is "Brave's implementation"??
– DEDaniel
Aug 6 at 11:17






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard