@log_calls<EOL><INDENT>def sync_files(self, source, target):<DEDENT>
src_s3_url = S3URL.is_valid(source)<EOL>dst_s3_url = S3URL.is_valid(target)<EOL>if src_s3_url and not dst_s3_url:<EOL><INDENT>self.get_files(source, target)<EOL><DEDENT>elif not src_s3_url and dst_s3_url:<EOL><INDENT>self.put_files(source, target)<EOL>if self.opt.delete_removed:<EOL><INDENT>self.delete_removed_files(source, target)<EOL><DEDENT><DEDENT>elif src_s3_url and dst_s3_url:<EOL><INDENT>self.cp_files(source, target)<EOL><DEDENT>else:<EOL><INDENT>raise InvalidArgument('<STR_LIT>')<EOL><DEDENT>
Sync files to S3. Does implement deletions if syncing TO s3.
           Currently identical to get/put -r -f --sync-check with exception of deletions.