MCPcopy
hub / github.com/docker/docker-py / make_tree

Function make_tree

tests/helpers.py:17–27  ·  view source on GitHub ↗
(dirs, files)

Source from the content-addressed store, hash-verified

15
16
17def make_tree(dirs, files):
18 base = tempfile.mkdtemp()
19
20 for path in dirs:
21 os.makedirs(os.path.join(base, path))
22
23 for path in files:
24 with open(os.path.join(base, path), 'w') as f:
25 f.write("content")
26
27 return base
28
29
30def simple_tar(path):

Calls 1

joinMethod · 0.80