def copy_files(src_dir, dst_dir, filespec='<STR_LIT:*>', recursive=False):
import os<EOL>from .modules import copyfiles<EOL>if src_dir == dst_dir:<EOL><INDENT>raise RuntimeError('<STR_LIT>')<EOL><DEDENT>if not os.path.isdir(src_dir):<EOL><INDENT>raise RuntimeError('<STR_LIT>'.format(src_dir))<EOL><DEDENT>return {<EOL>'<STR_LIT>': copyfiles.list_files,<EOL>'<STR_LIT>': copyfiles.copy_files,<EOL>'<STR_LIT:input>': src_dir,<EOL>'<STR_LIT>': dst_dir,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': filespec,<EOL>'<STR_LIT>': recursive,<EOL>},<EOL>}<EOL>
Copies any files matching filespec from src_dir into dst_dir.

If `recursive` is `True`, also copies any matching directories.