| Modifier and Type | Field and Description |
|---|---|
protected File |
cacheDir |
static String |
DEFAULT_CACHE_DIR |
protected List<String> |
localResourceDirs |
static String |
REF |
| Constructor and Description |
|---|
StrumpfResolver() |
| Modifier and Type | Method and Description |
|---|---|
File |
asFile(String resourcePath)
Get the specified resources as a standard local file.
|
protected void |
assertExists(String resourcePath) |
InputStream |
asStream(String resourcePath)
Get the specified resources as an input stream.
|
void |
copyDirectory(String dirPath,
File destinationDir)
Copy the directory resource (recursively) to the specified destination directory
|
boolean |
directoryExists(String dirPath)
Determine if the specified directory resource can be resolved by
Resolver.copyDirectory(String, File) |
boolean |
exists(@NonNull String resourcePath)
Determine if the specified file resource can be resolved by
Resolver.asFile(String) and Resolver.asStream(String) |
boolean |
hasLocalCache() |
File |
localCacheRoot() |
String |
normalizePath(@NonNull String path)
Normalize the path that may be a resource reference.
|
int |
priority()
Priority of this resolver.
|
public static final String DEFAULT_CACHE_DIR
public static final String REF
protected final File cacheDir
public int priority()
Resolverpublic boolean exists(@NonNull
@NonNull String resourcePath)
ResolverResolver.asFile(String) and Resolver.asStream(String)public boolean directoryExists(String dirPath)
ResolverResolver.copyDirectory(String, File)directoryExists in interface ResolverdirPath - Path of the directory resource to be resolvedpublic File asFile(String resourcePath)
ResolverResolver.exists(String)public InputStream asStream(String resourcePath)
ResolverResolver.exists(String)public void copyDirectory(String dirPath, File destinationDir)
ResolvercopyDirectory in interface ResolverdirPath - Path of the resource directory to resolvedestinationDir - Where the files should be copied topublic boolean hasLocalCache()
hasLocalCache in interface ResolverResolver.localCacheRoot()public File localCacheRoot()
localCacheRoot in interface ResolverResolver.hasLocalCache() returns falsepublic String normalizePath(@NonNull @NonNull String path)
ResolvernormalizePath in interface Resolverprotected void assertExists(String resourcePath)
Copyright © 2021. All rights reserved.