MCPcopy Index your code
hub / github.com/CrafterKolyan/tiny-python-docker-image / find_all_dockerfiles

Function find_all_dockerfiles

util/update-readme-table.py:12–21  ·  view source on GitHub ↗
(path, recursive=False)

Source from the content-addressed store, hash-verified

10
11
12def find_all_dockerfiles(path, recursive=False):
13 dockerfile_regex = re.compile(r"^Dockerfile\..*$")
14 if not recursive:
15 dockerfiles = [os.path.join(path, x) for x in os.listdir(path) if dockerfile_regex.fullmatch(x)]
16 dockerfiles = [x for x in dockerfiles if os.path.isfile(x)]
17 return dockerfiles
18 dockerfiles = []
19 for address, dirs, files in os.walk(path, topdown=True):
20 dockerfiles.extend([os.path.join(address, x) for x in files if dockerfile_regex.fullmatch(x)])
21 return dockerfiles
22
23
24def find_table(readme):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected