glob


Description:

public static List<Path>? glob (Path dir, string pattern)

Returns a list of file paths in the directory that match the given glob pattern.

Example:

    var dir = new Path ("/tmp/mydir");
var matches = Files.glob (dir, "*.txt");
if (matches != null) {
foreach (var p in matches) {
print ("%s\n", p.toString ());
}
}

Parameters:

dir

path to directory to search.

pattern

glob pattern to match file names against.

Returns:

a list of matching Paths, or null on error.