userdata.py 文件源码

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

项目:zielen 作者: lostatc 项目源码 文件源码
def check_excluded(
            self, paths: Iterable[str], start_path: str) -> Set[str]:
        """Get the paths that have been excluded by each client.

        Args:
            paths: The paths to check.
            start_path: The path of the directory to match globbing patterns
                against.

        Returns:
            The subset of input paths that have been excluded by each client.
        """
        pattern_files = []
        for entry in os.scandir(self._exclude_dir):
            pattern_files.append(ProfileExcludeFile(entry.path))

        rm_files = set()
        for path in paths:
            for pattern_file in pattern_files:
                if path not in pattern_file.all_matches(start_path):
                    break
            else:
                rm_files.add(path)

        return rm_files
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号