} else {
File bundleDirectory = new File(URI.create(urlString)).getParentFile();
// System.out.println("bundleDirectory: " +
// bundleDirectory.getAbsolutePath());
bundles = bundleDirectory.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith(prefix) && name.endsWith(extension);
}
});
}
HashSet bundleSet = new HashSet();
// Add local first
File localDir = new File(SystemProperties.getUserPath());
String localBundles[] = localDir.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith(prefix) && name.endsWith(extension);
}
});
// can be null if user path is borked
if ( localBundles != null ){
bundleSet.addAll(Arrays.asList(localBundles));
}
// Add AppDir 2nd
File appDir = new File(SystemProperties.getApplicationPath());
String appBundles[] = appDir.list(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith(prefix) && name.endsWith(extension);
}
});