I have been trying to save data to and from a file in the Activator object. I need to store some plugin specific configurations mainly to set the configuration.setUserInsertable(boolean)
property in the program node services. I can read resource files from the .jar package, but have not found a way to write to it yet.
I have found two other ways to store files:
- using the frameworks
bundleContext.getDataFile(String filename)
method - using an absolute path to the ‘/programs/’ folder
I don’t want my plugins configuration files to litter the filesystem, I want the files to be deleted when the plugin is uninstalled. What is the best method for achieving this?