match


Description:

public bool match (string pattern)

Returns whether this path's basename matches the given glob pattern.

The pattern uses shell-style wildcards: "*" matches any sequence of characters, "?" matches a single character.

Example:

    var path = new Path ("/home/user/readme.txt");
assert (path.match ("*.txt") == true);
assert (path.match ("*.log") == false);

Parameters:

pattern

the glob pattern to match against.

Returns:

true if the basename matches the pattern.