Added in API level 26

PathMatcher

public interface PathMatcher

java.nio.file.PathMatcher


An interface that is implemented by objects that perform match operations on paths.

Summary

Public methods

abstract boolean matches(Path path)

Tells if given path matches this matcher's pattern.

Public methods

matches

Added in API level 26
public abstract boolean matches (Path path)

Tells if given path matches this matcher's pattern.

Parameters
path Path: the path to match

Returns
boolean true if, and only if, the path matches this matcher's pattern