def path_contains_data(bucket, root_path, min_file_size=0, file_extension=None):
    """Checks if there are any files under this path that contain files of size greater than 0

    Args:
        bucket (boto.s3.bucket.Bucket): bucket within which to check.
        root_path (str): Should be the path relative to the bucket, does not support wildcards.
        file_extension (str): optional filter for file type, e.g. setting this to '.gz' will only be True if there
            are .gz files with in the path.
        min_file_size (int): sometimes we may have empty gz files so set a minimum file size for returning True.
            Files of exactly this size will be excluded.
    Returns:
        bool
    """
    for key in bucket.list(root_path):
        if file_extension and not key.name.endswith(file_extension):
            continue
        if key.size > min_file_size:
            return True

    return False