def s3_has_uptodate_file(bucket, transfer_file, s3_key_name):
    s3_key = bucket.get_key(s3_key_name)
    if s3_key:
        s3_size = s3_key.size
        local_size = os.path.getsize(transfer_file)
        s3_time = rfc822.mktime_tz(rfc822.parsedate_tz(s3_key.last_modified))
        local_time = os.path.getmtime(transfer_file)
        return s3_size == local_size and s3_time >= local_time
    return False
Check if S3 has an existing, up to date version of this file.
dataset/ETHPy150Open chapmanb/cloudbiolinux/utils/s3_multipart_upload.py/s3_has_uptodate_file