I noticed that zipfile.Path has a handy is_symlink() method, which internally derives from ZipFile.getinfo(name) → ZipInfo:
def is_symlink(self):
"""
Return whether this path is a symlink.
"""
info = self.root.getinfo(self.at)
mode = info.external_attr >> 16
return stat.S_ISLNK(mode)
Is there a reason why this method doesn’t exist directly on ZipInfo?
ZipInfo already has is_dir(), so there’s some precedent for including convenience methods like this. Having is_symlink() available there would save users from having to create a zipfile.Path object when they’re already working directly with a ZipFile.