Extended Attribute Mono bindings, now for FreeBSD and Linux

Back in April I contributed Extended Attribute (xattr) bindings to Mono, for use on Linux systems.

I’ve just committed a new version of these, creating a transparent layer, so that these bindings work exactly the same on FreeBSD as they do on Linux. On FreeBSD systems, this will make use of FreeBSD’s extattr API – effectively making the use of extended attributes somewhat portable. The interface which Mono exposes is still the Linux xattr API, but the slight differences between xattr/extattr are handled accordingly by the mono runtime. Thanks to Stephen Bennett (spb from Gentoo) for letting me test things on his FreeBSD install.

Extended attributes are metadata (key/value pairs) that you can apply to files, directories, and symlinks. For example, a program could store the mime-type of a file in an attribute to prevent the need to look it up in future. Extended attributes are nice, because they are stored in/near the file inode, making them cheap to use if you are going to be using the file anyway. Beagle uses them internally and suffers quite a bit when it has to resort to using a traditional database instead.

I’ve also been working on improving the unicode handling in the System.Uri class, which is pretty nasty.

Leave a Reply

You must be logged in to post a comment.