fs.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:urnote 作者: urnote 项目源码 文件源码
def is_same(dir1, dir2, **kwargs):
    """
    Compare two directory trees content.
    Return False if they differ, True is they are the same.
    """
    compared = dircmp(dir1, dir2, **kwargs)
    if (compared.left_only or compared.right_only or compared.diff_files
        or compared.funny_files):
        return False
    for subdir in compared.common_dirs:
        if not is_same(os.path.join(dir1, subdir), os.path.join(dir2, subdir), **kwargs):
            return False
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号