MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / glob

Function glob

tools/python-3.11.9-amd64/Lib/glob.py:13–29  ·  view source on GitHub ↗

Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. Unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns by default. If `include_hidden` is true, th

(pathname, *, root_dir=None, dir_fd=None, recursive=False,
        include_hidden=False)

Source from the content-addressed store, hash-verified

11__all__ = ["glob", "iglob", "escape"]
12
13def glob(pathname, *, root_dir=None, dir_fd=None, recursive=False,
14 include_hidden=False):
15 """Return a list of paths matching a pathname pattern.
16
17 The pattern may contain simple shell-style wildcards a la
18 fnmatch. Unlike fnmatch, filenames starting with a
19 dot are special cases that are not matched by '*' and '?'
20 patterns by default.
21
22 If `include_hidden` is true, the patterns '*', '?', '**' will match hidden
23 directories.
24
25 If `recursive` is true, the pattern '**' will match any files and
26 zero or more directories and subdirectories.
27 """
28 return list(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive,
29 include_hidden=include_hidden))
30
31def iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False,
32 include_hidden=False):

Callers

nothing calls this directly

Calls 2

listFunction · 0.85
iglobFunction · 0.70

Tested by

no test coverage detected