@log_calls<EOL><INDENT>def get_files(self, source, target):<DEDENT>
pool = ThreadPool(ThreadUtil, self.opt)<EOL>source = self.source_expand(source)<EOL>if os.path.isdir(target):<EOL><INDENT>for src in source:<EOL><INDENT>self.get_single_file(pool, src, os.path.join(target, self.get_basename(S3URL(src).path)))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if len(source) > <NUM_LIT:1>:<EOL><INDENT>raise Failure('<STR_LIT>' % target)<EOL><DEDENT>elif len(source) == <NUM_LIT:1>:<EOL><INDENT>self.get_single_file(pool, source[<NUM_LIT:0>], target)<EOL><DEDENT>else:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>pool.join()<EOL>
Download files.
           This function can handle multiple files if source S3 URL has wildcard
           characters. It also handles recursive mode by download all files and
           keep the directory structure.