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

Method create_symlink

Lib/test/test_pathlib/support/zip_path.py:46–49  ·  view source on GitHub ↗
(self, path, target)

Source from the content-addressed store, hash-verified

44 path.zip_file.writestr(zip_info, '')
45
46 def create_symlink(self, path, target):
47 zip_info = zipfile.ZipInfo(vfspath(path))
48 zip_info.external_attr = stat.S_IFLNK << 16
49 path.zip_file.writestr(zip_info, target.encode())
50
51 def create_hierarchy(self, p):
52 # Add regular files

Calls 3

vfspathFunction · 0.90
writestrMethod · 0.80
encodeMethod · 0.45