MCPcopy Create free account
hub / github.com/oshi/oshi / matches

Method matches

oshi-core/src/main/java/oshi/util/FileSystemUtil.java:128–135  ·  view source on GitHub ↗

Checks if text matches any of @param patterns}. @param text The text to be matched. @param patterns List of patterns. @return true if given text matches at least one glob pattern or false otherwise. @see <a href="https://en.wikipedia.org/wiki/Gl

(Path text, List<PathMatcher> patterns)

Source from the content-addressed store, hash-verified

126 * glob (programming)</a>
127 */
128 public static boolean matches(Path text, List<PathMatcher> patterns) {
129 for (PathMatcher pattern : patterns) {
130 if (pattern.matches(text)) {
131 return true;
132 }
133 }
134 return false;
135 }
136
137}

Callers 15

testWithGlobPrefixMethod · 0.95
testWithMoreItemsMethod · 0.95
testWithSuffixPatternMethod · 0.95
isFileStoreExcludedMethod · 0.95
queryProcessorIdMethod · 0.80
initProcessorCountsMethod · 0.80
parseTopologyMethod · 0.80
initProcessorCountsMethod · 0.80
querySwapInfoMethod · 0.80

Calls

no outgoing calls

Tested by 6

testWithGlobPrefixMethod · 0.76
testWithMoreItemsMethod · 0.76
testWithSuffixPatternMethod · 0.76