def main(): import localLibs.test.testDbSys as testDbSys res = {} d = testDbSys.testDbSys() packageCollection("d:/tmp/", d, res) print res
def main(): import localLibSys import localLibs.test.testDbSys as testDbSys res = {} d = testDbSys.testDbSys() packageTreePath("d:/tmp/", d, res) print res
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
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
import collectionInterface as collectionInterface
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