def main():
    import localLibs.test.testDbSys as testDbSys

    res = {}
    d = testDbSys.testDbSys()
    packageCollection("d:/tmp/", d, res)
    print res
示例#2
0
def main():
    import localLibSys
    import localLibs.test.testDbSys as testDbSys
    res = {}
    d = testDbSys.testDbSys()
    packageTreePath("d:/tmp/", d, res)
    print res
示例#3
0
def main():
    import localLibs.test.testDbSys as testDbSys
    res = {}
    d = testDbSys.testDbSys()
    co = collectionManager.getCollection('G:/app/wwj/cryptload', d)
    print '\n\n\n'
    h=collectionContainer(co, d).getRange(50, 50)
    print '\n\n\n'
    print h
示例#4
0
def main():
    d = testDbSys.testDbSys()
    res = submitter.packagePathRecurse("d:/tmp", d)
    s = json.dumps(res, sort_keys=True, indent=4)
    jsonRes = u"\n".join([l.rstrip() for l in s.splitlines()])
    print jsonRes
    f = open("d:/tmp/dirJson.json", "w")
    f.write(jsonRes)
    f.close()
    r = json.loads(jsonRes)
    print r
示例#5
0
import collectionInterface as collectionInterface
示例#6
0
        
class fileSizeProcessor:
    def process(self, item, dbInst):
        sizeDb(dbInst).getSize(item)
        
    
class localPathElement(localTaskInterfaces.elementInterface):
    def __init__(self, fullPath, dbInst):
        #if os.path.isdir(fullPath):
        #    raise onlyFileElementHasFileSizeThisIsADir()
        self.fullPath = fullPath
        self.dbInst = dbInst
    def getCachedPath(self):
        return transform.transformDirToInternal(self.fullPath)
    def getId(self):
        import localLibs.cache.localFileSystemCache as localFileSystemCache
        cacheSys = localFileSystemCache.localFileSystemCache(self.dbInst)
        return cacheSys.getObjId(self.fullPath)

        
if __name__=='__main__':
    import localLibs.test.testDbSys as testDbSys
    d = testDbSys.testDbSys()
    l = localPathElement("H:\\Need to check\\6120c_4061.sisx", d)
    processElement(l, d)
    itemSizeDb = d.getDb("infoCollectionItemSize")
    sizeDb = d.getDb("infoCollectionSizeDb")
    size = itemSizeDb[l.getId()]
    print size
    print sizeDb[unicode(str(size[0]))]
import fileSystemCollection