public final class InstalledFileLocatorImpl extends InstalledFileLocator
Constructor and Description |
---|
InstalledFileLocatorImpl() |
Modifier and Type | Method and Description |
---|---|
static void |
discardCache()
Called after startup is essentially complete.
|
File |
locate(String relativePath,
String codeNameBase,
boolean localized)
Searches user dir and install dir(s).
|
Set<File> |
locateAll(String relativePath,
String codeNameBase,
boolean localized) |
static void |
prepareCache()
Called from
Main.run early in the startup sequence to indicate
that available files should be cached from now on. |
getDefault
public static void prepareCache()
Main.run
early in the startup sequence to indicate
that available files should be cached from now on. Should be matched by a call to
InstalledFileLocatorImpl.discardCache()
since the cache will be invalid if the user
e.g. installs a new NBM without restarting.public static void discardCache()
InstalledFileLocator
are
during startup so that is when the cache has the most effect.
XXX called somewhat too late, before all libraries are initialized.
Better might be to wait until a few seconds have passed since the last call.
Or check for changes in .lastModified files since these should change if
any NBM activity happens.public File locate(String relativePath, String codeNameBase, boolean localized)
locate
in class InstalledFileLocator