| 233 |
| 234 |
| 235 |
| 236 |
| 237 |
| 238 |
| 239 |
| 240 |
| 241 |
| 242 |
| 243 |
| 244 |
| 245 |
| 246 |
| 247 |
| 248 |
| 249 |
| 250 |
| 251 |
| 252 |
| 253 | |
def copy(self, target, archive=False): |
""" copy path to target.""" |
assert not archive, "XXX archive-mode not supported" |
if self.check(file=1): |
if target.check(dir=1): |
target = target.join(self.basename) |
assert self!=target |
-> copychunked(self, target) |
else: |
target.ensure(dir=1) |
def rec(p): |
return p.check(link=0) |
for x in self.visit(rec=rec): |
relpath = x.relto(self) |
newx = target.join(relpath) |
if x.check(link=1): |
newx.mksymlinkto(x.readlink()) |
elif x.check(file=1): |
copychunked(x, newx) |
elif x.check(dir=1): |
newx.ensure(dir=1) | |