MCPcopy Create free account
hub / github.com/demoth/jake2 / FindAll

Method FindAll

qcommon/src/main/java/jake2/qcommon/sys/Sys.java:56–80  ·  view source on GitHub ↗
(String path, int musthave, int canthave)

Source from the content-addressed store, hash-verified

54
55 //ok!
56 public static File[] FindAll(String path, int musthave, int canthave) {
57
58 int index = path.lastIndexOf('/');
59
60 if (index != -1) {
61 findbase = path.substring(0, index);
62 findpattern = path.substring(index + 1, path.length());
63 } else {
64 findbase = path;
65 findpattern = "*";
66 }
67
68 if (findpattern.equals("*.*")) {
69 findpattern = "*";
70 }
71
72 File fdir = new File(findbase);
73
74 if (!fdir.exists())
75 return null;
76
77 FilenameFilter filter = new FileFilter(findpattern, musthave, canthave);
78
79 return fdir.listFiles(filter);
80 }
81
82 /**
83 * Match the pattern findpattern against the filename.

Callers 3

FindFirstMethod · 0.95
ExecAutoexecMethod · 0.95
ListFilesMethod · 0.95

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected