MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / collectFilesFixed

Method collectFilesFixed

src/main/java/net/optifine/util/ResUtils.java:92–116  ·  view source on GitHub ↗
(IResourcePack rp, String[] paths)

Source from the content-addressed store, hash-verified

90 }
91
92 private static String[] collectFilesFixed(IResourcePack rp, String[] paths)
93 {
94 if (paths == null)
95 {
96 return new String[0];
97 }
98 else
99 {
100 List list = new ArrayList();
101
102 for (int i = 0; i < paths.length; ++i)
103 {
104 String s = paths[i];
105 ResourceLocation resourcelocation = new ResourceLocation(s);
106
107 if (rp.resourceExists(resourcelocation))
108 {
109 list.add(s);
110 }
111 }
112
113 String[] astring = (String[])((String[])list.toArray(new String[list.size()]));
114 return astring;
115 }
116 }
117
118 private static String[] collectFilesFolder(File tpFile, String basePath, String[] prefixes, String[] suffixes)
119 {

Callers 1

collectFilesMethod · 0.95

Calls 4

resourceExistsMethod · 0.65
addMethod · 0.45
toArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected