def __reportFunc(self, pPathBase, pPath, pType, pInode, pData): if pInode == '0': lHashDigest = '' else: lHash = hashlib.md5() lHash.update(os_wrapper.icat( self.mFilename, self.mainwidget.offset.text(), pInode )) lHashDigest = lHash.hexdigest() pData.write(pPathBase, pPath, pType, pInode, lHashDigest)
def __exportFunc(self, pPathBase, pPath, pType, pInode, pData=None): if pInode == '0' or pPath == '/': return lPath = os.path.join(pPathBase.decode('utf-8'), pPath.decode('utf-8')) with open(lPath, "wb") as lFH: lFH.write( os_wrapper.icat( self.mFilename, self.mainwidget.offset.text(), pInode ) )