def files_equal(walker, path1, path2):
    """Checks if two files are equal"""
    chunk_size = 8192
    with walker.open(path1, 'rb') as f1, walker.open(path2, 'rb') as f2:
        while True:
            chunk1 = f1.read(chunk_size)
            chunk2 = f2.read(chunk_size)
            if chunk1 != chunk2:
                return False
            if not chunk1:
                return True
