def copyCache(self, src, dst, **kw): cache_src = self.getCacheFolder(src) if not os.path.exists(cache_src): return cache_dst = self.getCacheFolder(dst) cache_dst_parent = os.path.dirname(cache_dst) if not os.path.exists(cache_dst_parent): os.makedirs(cache_dst_parent) if not os.path.exists(cache_dst): ucopytree(cache_src, cache_dst)
def copyCache(self, src, dst, **kw): cache_src = self.getCacheFolder(src) if not os.path.exists(cache_src): return cache_dst = self.getCacheFolder(dst) cache_dst_parent = os.path.dirname(cache_dst) if not os.path.exists( cache_dst_parent ): os.makedirs(cache_dst_parent ) if not os.path.exists(cache_dst): ucopytree(cache_src, cache_dst)
def copytree(self, vSrc, vDst): # copy2 don't work well with encoding # in fact it is os.utime don't work well ossrc = self.ospath(vSrc) osdst = self.ospath(vDst) ucopytree(ossrc, osdst, symlinks=False)