Some times there is a requirement to get the folder or File URL for the installed bundles .
The below snippet can use for this purpose
public static URL getBundleFileURL(Bundle bundle) {
URL u = FileLocator.find(bundle, new Path("/"), null);
try {
return FileLocator.toFileURL(u);
} catch (IOException e) {
// Log error
}
return null;
}
Hope it helps!!!
13.7.08
Subscribe to:
Post Comments (Atom)
0 opinions:
Post a Comment