getxattr

Python on Mac: Using the xattr functions to get extended attributes

Have you ever noticed that sometimes when you copy OS X files from your Mac to, say, a Linux or Windows server, you get a bunch of files that begin with ._? Those are metadata files. They store extended attributes for other files. Why don't they appear on Mac OS X? Because on OS X, extended attributes are stored in the file system itself, not in auxiliary hidden files. In this article, I am going to cover how you can use Python on your Mac to access the extended attributes.

Syndicate content