selection.py 文件源码

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

项目:rdiff-backup 作者: sol1 项目源码 文件源码
def filelist_globbing_get_sfs(self, filelist_fp, inc_default, list_name):
        """Return list of selection functions by reading fileobj

        filelist_fp should be an open file object
        inc_default is true iff this is an include list
        list_name is just the name of the list, used for logging
        See the man page on --[include/exclude]-globbing-filelist

        """
        log.Log("Reading globbing filelist %s" % list_name, 4)
        separator = Globals.null_separator and "\0" or "\n"
        for line in filelist_fp.read().split(separator):
            if not line: continue # skip blanks
            if line[:2] == "+ ": yield self.glob_get_sf(line[2:], 1)
            elif line[:2] == "- ": yield self.glob_get_sf(line[2:], 0)
            else: yield self.glob_get_sf(line, inc_default)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号