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

Method readlink

Lib/test/test_pathlib/support/zip_path.py:283–289  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

281 return (self / name for name in info.children)
282
283 def readlink(self):
284 info = self.info
285 if not info.exists():
286 raise FileNotFoundError(errno.ENOENT, "File not found", self)
287 elif not info.is_symlink():
288 raise OSError(errno.EINVAL, "Not a symlink", self)
289 return self.with_segments(self.zip_file.read(info.zip_info).decode())
290
291
292class WritableZipPath(_WritablePath):

Calls 5

with_segmentsMethod · 0.95
existsMethod · 0.45
is_symlinkMethod · 0.45
decodeMethod · 0.45
readMethod · 0.45