MCPcopy Create free account
hub / github.com/OWASP/Python-Honeypot / copy_dir_tree

Function copy_dir_tree

core/compatible.py:158–179  ·  view source on GitHub ↗

copytree a directory Args: src: source directory dst: destination directory symlinks: copy symlinks ignore: ignore Returns: True

(src, dst, symlinks=True, ignore=None)

Source from the content-addressed store, hash-verified

156
157
158def copy_dir_tree(src, dst, symlinks=True, ignore=None):
159 """
160 copytree a directory
161
162 Args:
163 src: source directory
164 dst: destination directory
165 symlinks: copy symlinks
166 ignore: ignore
167
168 Returns:
169 True
170 """
171 # https://stackoverflow.com/a/12514470
172 for item in os.listdir(src):
173 s = os.path.join(src, item)
174 d = os.path.join(dst, item)
175 if os.path.isdir(s):
176 shutil.copytree(s, d, symlinks, ignore)
177 else:
178 shutil.copy2(s, d)
179 return True
180
181
182def get_module_dir_path(module):

Callers 1

create_new_imagesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected