MCPcopy Index your code
hub / github.com/RustPython/RustPython / symlink_to

Method symlink_to

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

Source from the content-addressed store, hash-verified

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

Calls 2

strFunction · 0.85
writestrMethod · 0.80