How to access electron.app.getPath()?
Clash 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');
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.
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