@log_calls<EOL><INDENT>def cp_single_file(self, pool, source, target, delete_source):<DEDENT>
if source[-<NUM_LIT:1>] == PATH_SEP:<EOL><INDENT>if self.opt.recursive:<EOL><INDENT>basepath = S3URL(source).path<EOL>for f in (f for f in self.s3walk(source) if not f['<STR_LIT>']):<EOL><INDENT>pool.copy(f['<STR_LIT:name>'], os.path.join(target, os.path.relpath(S3URL(f['<STR_LIT:name>']).path, basepath)), delete_source=delete_source)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>message('<STR_LIT>' % source)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pool.copy(source, target, delete_source=delete_source)<EOL><DEDENT>
Copy a single file or a directory by adding a task into queue