find(path,
include_dirs=True,
include_files=True,
name_regex=None,
not_name_regex=None,
whole_name_regex=None,
not_whole_name_regex=None,
exclude_root=False,
relative=False,
limit_depth=None)
| source code
|
Creates an iterator of files matching a variety of conditions.
- Parameters:
path - which path to iterate
include_dirs - include directories in output
include_files - include files in output
name_regex - optional regex string compared against basename of file
not_name_regex - if specificed only produces names not matching this regex
whole_name_regex - like name_regex but applies to whole path, not just basename
not_whole_name_regex - like not_name_regex but applies to whole path
exclude_root - do not include the intput 'path' itself in the output
limit_depth - do not list items deeper than this level from root
relative - filenames are relative to "path" as opposed to appended
to path
- Returns:
- a generator for the matched files
|