示例#1
0
def AddTasks(url, scripttype, queue):
    db = DictDatabase(scripttype)
    for i in db.getPaths():
        if scripttype == 'cmstype':
            path = CmsPath(url, db, i)
            queue.put(path)
        else:
            path = DirPath(url, db, i)
            queue.put(path)
示例#2
0
文件: common.py 项目: a4m/pathscanner
def AddTasks(url, scripttype, queue):
    db = DictDatabase(scripttype) 
    for i in db.getPaths():
        if scripttype == 'cmstype':
            path = CmsPath(url, db, i)
            queue.put(path)
        else:            
            path = DirPath(url, db, i)
            queue.put(path)
示例#3
0
def AddTasksToList(url, scripttype, lst):
    db = DictDatabase(scripttype)
    for i in db.getPaths():
        if scripttype == 'cmstype':
            path = CmsPath(url, db, i)
            lst.append(path)
        else:
            path = DirPath(url, db, i)
            lst.append(path)
示例#4
0
文件: common.py 项目: a4m/pathscanner
def AddTasksToList(url, scripttype, lst):
    db = DictDatabase(scripttype)
    for i in db.getPaths():
        if scripttype == 'cmstype':
            path = CmsPath(url, db, i)
            lst.append(path)
        else:
            path = DirPath(url, db, i)
            lst.append(path)
示例#5
0
    def GetScanNum(self):
        if self.nums >= 0:
            return self.nums

        res = 0
        for i in self.GetDBScriptType():
            res += DictDatabase(i).nums()

        if self.scanfile:
            for t in self.scanfile:
                if not t: continue
                with open(t, 'rb') as fp:
                    res += len(fp.readlines())

        self.nums = res
        return res