Access text file in a Plugin Project

This is how my project paths are set up.

Now I am trying to get the text from the file mappings.json. The red circle indicates my code. I keep getting a FileNotFoundException. I have tried variations of the filepath e.g. /dir/mappings.json , .\dir\mappings.json. None of these are working.

How can I access this file so that it's also a part of the final built plugin?

Edit: I found one potential problem, and fixed it. The folder was not designated as a resource, after that it's now being package, however my path is still incorrect.

Edit 2: Okay so I got it to work finally using the answer provided here.

Message was edited by: Osama Rao


Please sign in to leave a comment.