GlobSource#

class GlobSource(params=None, **kwargs)#

Bases: MultiFileSource, CachedModule

Find files using glob patterns.

Relies on the function glob.glob(). Glob pattern are Unix shell-style wildcards:

  • * matches everything

  • ? matches a single character

  • [seq] matches any character in seq (once)

  • [!seq] matches any character not in seq

Parameters:

params (t.Any | None)

RECURSIVE: bool = True#

Correspond to the recursive argument to glob.

If True, the pattern ** will match any files and zero or more directories, subdirectories and symbolic links to directories.

_lines()#

Human readable description.

Return type:

list[str]

property datafiles: list[str]#

Cached list of files found by using glob.

get_glob_pattern()#

Return the glob pattern matching your files.

If it is defined, the pattern starts from get_root_directory().

Not implemented:

implement in your DataManager subclass.

Return type:

str