How to add a new file [message #459976] |
Sat, 09 December 2006 14:08  |
Eclipse User |
|
|
|
Originally posted by: florianwendland.freenet.de
Hello all,
what's the common way, to store, for example a new user profile, in the
bundle.
With
FileLocator.find(Platform.getBundle(Activator.PLUGIN_ID),new
Path("profiles"+File.separator+"florian.profile"), null)));
I get the default profile. Now, I want, that other users are able to
store their profiles into PLUGIN/profiles/newProfile.profile.
Thx
Florian
|
|
|
Re: How to add a new file [message #459978 is a reply to message #459976] |
Sun, 10 December 2006 05:27  |
Eclipse User |
|
|
|
The bundle is really a read-only place, not a read-write place. You want to use Plugin.getPluginStateLocation() for a place that you can persist data once it's been changed. Of course, you can have a default one in your bundle to be loaded if the user doesn't have a profile, but you should look at the state to store persistent/changeable data.
The Bundle API doesn't have anything for inserting new files into the bundle at run-time, because it's not a supported use of bundles.
Alex.
|
|
|
Powered by
FUDForum. Page generated in 0.02573 seconds