def copyxattr(src, dest):
"""
Copy the extended attributes (xattr) from `src` to `dest`.
NOTE: xattr only available on Linux.
"""
if not hasattr(os, "listxattr"):
return
for name in os.listxattr(src):
value = os.getxattr(src, name)
os.setxattr(dest, name, value)
评论列表
文章目录