Skip navigation.
 
mlRe: Resource Fork - is this a good use/the right thing to do?
FROM : Gerd Knops
DATE : Wed Apr 23 18:41:02 2008

Coincidentally I just went through that same song and dance. With 
Spotlight becoming more and more important in OSX, it is surprising 
Apple has not provided a clean method to store arbitrary metadata with 
any kind of file. Maybe time for us all to file an enhancement request.

As others have mentioned, all currently available methods have 
drawbacks:

- resource fork: Antiquated, entire data has to be read and stored 
back to even change a flag, creeping feeling they might be dropped at 
some point, care has to be taken which tools are used to process the 
files so resource fork is not lost.

- xattrs: limited storage per attribute, tools may loose them.

- Other approaches like db, links, hidden files etc: Separation of 
file and metadata, no support by standard tools, synching is tricky.


Adobe attempted to solve the dilemma for graphic files by introducing 
XMP (http://www.adobe.com/products/xmp/), but it suffers from serious 
drawbacks:

- Not a generic solution
- Entire files have to be rewritten to modify metadata
- Adding the metadata in some file formats seems like a hack, and has 
limitations that are dependent on the file format
- Overly complicated and limiting storage schema
- SDK seems overly complicated (mildly speaking) and still lacking 
core functionality

Of course there are advantages to:

- Platform independent
- Metadata stays with files, no special knowledge required by file-
handling tools, file systems or OS


But overall no clear winner. Only option is to analyse one's design 
goals, and pick the lesser of the evils.

In my opinion the best hypothetical solution would be if each file 
comes with a related directory that allows for storage of arbitrary 
metadata. However the hurdles of introducing something like that are 
enormous: All tools (simple tools like cp, complexer tools like tar, 
zip, rsync) would need to add support, and ways to make storage on 
alien file systems and efficient use through network file systems 
would have to be found.

With metadata becoming more and more important in daily use it would 
be great if a platform independent way of storing metadata would be 
devised. But I am not holding my breath. In the mean time we all 
muddle along with our individual solutions...

Another, though related, issue is that spotlight importers still can 
not be cascaded. Even just adding a few simple fields of metadata to 
an existing file format means one has to re-implement the importer for 
that format from scratch, no way of 'sub-classing' existing importers.

Gerd (filing an enhancement request next)

Related mailsAuthorDate
mlResource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 23, 07:21
mlRe: Resource Fork - is this a good use/the right thing to do? Jens Alfke Apr 23, 08:07
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 23, 09:41
mlRe: Resource Fork - is this a good use/the right thing to do? Rob Keniger Apr 23, 14:14
mlRe: Resource Fork - is this a good use/the right thing to do? Ken Thomases Apr 23, 14:29
mlRe: Resource Fork - is this a good use/the right thing to do? Matt Gough Apr 23, 15:01
mlRe: Resource Fork - is this a good use/the right thing to do? Adam R. Maxwell Apr 23, 15:41
mlRe: Resource Fork - is this a good use/the right thing to do? Sean McBride Apr 23, 16:12
mlRe: Resource Fork - is this a good use/the right thing to do? Jens Alfke Apr 23, 17:10
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 23, 18:05
mlRe: Resource Fork - is this a good use/the right thing to do? John Stiles Apr 23, 18:25
mlRe: Resource Fork - is this a good use/the right thing to do? Gerd Knops Apr 23, 18:41
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 23, 18:41
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 23, 19:00
mlRe: Resource Fork - is this a good use/the right thing to do? Uli Kusterer Apr 23, 20:14
mlRe: Resource Fork - is this a good use/the right thing to do? Uli Kusterer Apr 23, 20:25
mlRe: Resource Fork - is this a good use/the right thing to do? Chris Williams Apr 23, 21:33
mlRe: Resource Fork - is this a good use/the right thing to do? Mike Fischer Apr 24, 02:59
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 03:53
mlRe: Resource Fork - is this a good use/the right thing to do? Chris Suter Apr 24, 04:59
mlRe: Resource Fork - is this a good use/the right thing to do? Jason Stephenson Apr 24, 05:33
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 05:55
mlRe: Resource Fork - is this a good use/the right thing to do? Dmitry Markman Apr 24, 06:17
mlRe: Resource Fork - is this a good use/the right thing to do? Graham Cox Apr 24, 06:28
mlRe: Resource Fork - is this a good use/the right thing to do? Chris Suter Apr 24, 06:46
mlRe: Resource Fork - is this a good use/the right thing to do? Graham Cox Apr 24, 06:52
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 08:14
mlRe: Resource Fork - is this a good use/the right thing to do? Chris Suter Apr 24, 08:27
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 09:16
mlRe: Resource Fork - is this a good use/the right thing to do? Uli Kusterer Apr 24, 11:34
mlRe: Resource Fork - is this a good use/the right thing to do? Uli Kusterer Apr 24, 11:52
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 13:08
mlRe: Resource Fork - is this a good use/the right thing to do? Michael Ash Apr 24, 13:44
mlRe: Resource Fork - is this a good use/the right thing to do? glenn andreas Apr 24, 14:41
mlRe: Resource Fork - is this a good use/the right thing to do? Daniel DeCovnick Apr 24, 17:28
mlRe: Resource Fork - is this a good use/the right thing to do? Hamish Allan Apr 24, 17:36
mlRe: Resource Fork - is this a good use/the right thing to do? Bill Monk Apr 24, 20:52
mlRe: Resource Fork - is this a good use/the right thing to do? Scott Ribe Apr 25, 16:49