def METHOD_NAME(name, dir_fd1, dir_fd2, path, differences):
    try:
        fd1 = os.open(name, flags=os.O_RDONLY, dir_fd=dir_fd1)
    except OSError:
        return
    try:
        fd2 = os.open(name, flags=os.O_RDONLY, dir_fd=dir_fd2)
    except OSError:
        os.close(fd1)
        return
    try:
        hash1 = hash_file(fd1)
        hash2 = hash_file(fd2)
        if hash1 != hash2:
            props = differences.setdefault(path, {})
            props["content"] = [hash1, hash2]
    finally:
        os.close(fd1)
        os.close(fd2)