I have been trying to use __dirname for fs.readFile. But __dirname doesn't seem to give me the correct file path.
To be more specific, I am trying to develop a plugin for the Obsidian app and the path to the plugin folder should look something like
something/.obsidian/plugins/
But when I print the path with
console.log(__dirname)
It gives me
Applications/obsidian.app/Contents/Resources/electron.asar/renderer
I am not sure if this would be a problem specific to the Obsidian app, but shouldn't __dirname return the path to my current file in the repository?
My code is in TypeScript by the way, let me know if any further clarification is needed.