public class DirectoryResourcePack extends AbstractFileResourcePack
| Modifier and Type | Field and Description |
|---|---|
private static CharMatcher |
BACKSLASH_MATCHER |
private static boolean |
IS_WINDOWS |
private static Logger |
LOGGER |
base| Constructor and Description |
|---|
DirectoryResourcePack(File base) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected boolean |
containsFile(String name) |
private void |
findFiles(File file,
int maxDepth,
String namespace,
List<Identifier> found,
String prefix,
Predicate<String> pathFilter) |
Collection<Identifier> |
findResources(ResourceType type,
String namespace,
String prefix,
int maxDepth,
Predicate<String> pathFilter) |
private File |
getFile(String name) |
Set<String> |
getNamespaces(ResourceType type) |
static boolean |
isValidPath(File file,
String filename) |
protected InputStream |
openFile(String name) |
contains, getName, open, openRoot, parseMetadata, parseMetadata, relativize, warnNonLowerCaseNamespaceprivate static final Logger LOGGER
private static final boolean IS_WINDOWS
private static final CharMatcher BACKSLASH_MATCHER
public DirectoryResourcePack(File base)
public static boolean isValidPath(File file, String filename) throws IOException
IOExceptionprotected InputStream openFile(String name) throws IOException
openFile in class AbstractFileResourcePackIOExceptionprotected boolean containsFile(String name)
containsFile in class AbstractFileResourcePackpublic Set<String> getNamespaces(ResourceType type)
public void close()
public Collection<Identifier> findResources(ResourceType type, String namespace, String prefix, int maxDepth, Predicate<String> pathFilter)