MCPcopy Index your code
hub / github.com/python/cpython / symlink_to

Method symlink_to

Lib/test/test_pathlib/support/zip_path.py:332–337  ·  view source on GitHub ↗
(self, target, target_is_directory=False)

Source from the content-addressed store, hash-verified

330 self.zip_file.writestr(zinfo, '')
331
332 def symlink_to(self, target, target_is_directory=False):
333 zinfo = zipfile.ZipInfo(vfspath(self))
334 zinfo.external_attr = stat.S_IFLNK << 16
335 if target_is_directory:
336 zinfo.external_attr |= 0x10
337 self.zip_file.writestr(zinfo, target)

Calls 2

vfspathFunction · 0.90
writestrMethod · 0.80