89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | |
def mksymlinkto(self, value, absolute=1): |
""" create a symbolic link with the given value (pointing to another name). """ |
if absolute: |
self._callex(os.symlink, str(value), self.strpath) |
else: |
-> base = self.common(value) |
|
relsource = self.__class__(value).relto(base) |
reldest = self.relto(base) |
n = reldest.count(self.sep) |
target = self.sep.join(('..', )*n + (relsource, )) |
self._callex(os.symlink, target, self.strpath) | |