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

Method _xattrs

Lib/pathlib/__init__.py:747–757  ·  view source on GitHub ↗

Return the xattrs as a list of (attr, value) pairs, or an empty list if extended attributes aren't supported.

(self, *, follow_symlinks=True)

Source from the content-addressed store, hash-verified

745
746 if hasattr(os, 'listxattr'):
747 def _xattrs(self, *, follow_symlinks=True):
748 """Return the xattrs as a list of (attr, value) pairs, or an empty
749 list if extended attributes aren't supported."""
750 try:
751 return [
752 (attr, os.getxattr(self._path, attr, follow_symlinks=follow_symlinks))
753 for attr in os.listxattr(self._path, follow_symlinks=follow_symlinks)]
754 except OSError as err:
755 if err.errno not in (EPERM, ENOTSUP, ENODATA, EINVAL, EACCES):
756 raise
757 return []
758
759
760def _copy_info(info, target, follow_symlinks=True):

Callers 1

_copy_infoFunction · 0.80

Calls 2

getxattrMethod · 0.80
listxattrMethod · 0.80

Tested by

no test coverage detected