Haiku's filesystem attributes
Apparently Haiku (and its spiritual predecessor BeOS) can store arbitrary attributes and data on any file within the filesystem. Unlike Mac OS X’s resource forks, it’s not just another file which is treated specially by some software, but not others. Has an API and data structure within the filesystem’s disk structure.
Read more from this book about Haiku’s filesystem design - https://www.haiku-os.org/legacy-docs/practical-file-system-design.pdf
I spent way too much time figuring out how the API works. I know what doesn’t
work. The haiku_pyapi_python310 package ships a Be.fs_attr module with
hopelessly low level bindings for fs_read_attr, fs_stat_attr, and all the
others. For a couple reasons, it’s not sensible over declaring one’s own
foreign function interface which constructs a C procedure call without proper
language bindings. (I couldn’t figure out the correct types to call into the
Be.fs_attr functions, despite helpful type annotations.)
At least there is listattr — check it out! Some applications record the
URL of downloaded files as a file attribute!. Yup, that’s what the
META:URL attribute stores (see screenshot). This is not dissimilar to Mac
OS’s use of its extended attributes (kMDItemWhereFroms).
Woops, I glanced into the abyss of filesystem quirks and the quirks stared back.