@classmethod<EOL><INDENT>def match(Class, path, pattern, flags=re.I, sortkey=None, ext=None):<DEDENT>
return sorted(<EOL>[<EOL>Class(fn=fn)<EOL>for fn in rglob(path, f"<STR_LIT>")<EOL>if re.search(pattern, os.path.basename(fn), flags=flags) is not None<EOL>and os.path.basename(fn)[<NUM_LIT:0>] != '<STR_LIT>'  <EOL>],<EOL>key=sortkey,<EOL>)<EOL>
for a given path and regexp pattern, return the files that match