Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Metadata support




On Jun 25, 2006, at 6:34 PM, Boyd Waters wrote:

On Jun 25, 2006, at 4:28 PM, Dan Shoop wrote:

[Boyd Waters asked]
Is there really no way to copy a file - along with *all* metadata* - in one operation?

Not currently it seems. :(

And probably it's going to be a very long wait, so long as Apple keeps cruft in .DS_Store's as said cruft would need to be copied between source and target .DS_Store's which is a

Moreover Spotlight non-comment metadata isn't likely to get copied ever, but probably shouldn't be either; nor is there much value as the kernel can just re-create it.


Hmm.. ok, I think I understand about the Spotlight meta-data being re-created: that's determined by the various Spotlight metadata importers, which pull info from the "data-data" of the file and populate various name/value pairs for the Spotlight search tool. I've written such a metadata-importer spec for Spotlight...


But I'm more interested in storing other meta-data values in files as POSIX extended attributes, and I want any file operations to preserve those xattrs.


This seems to work already:

$ xattr --set fred blue foo
$ xattr --set barney red foo
$ xattr --list foo
foo
        barney  red
          fred  blue
$ cp foo bar
$ xattr --list bar
bar
        barney  red
          fred  blue


So perhaps - for my use cases, anyway - the only thing I need to worry about is file transfer to non-Macintosh servers via ssh or rsync (that is, non-Mac-mounted filesystems). I've patched rsync on my Linux box to handle that, but scp needs a similar patch? (I see that Mac scp has the '-E' flag).


$ scp foo host.loopback.edu:test-axttr
foo 100% 0 0.0KB/s 00:00


$ scp host.loopback.edu:test-axttr ./roundTrip
test-axttr 100% 0 0.0KB/s 00:00


$ xattr --list ./roundTrip
./roundTrip
(no extended attributes)


Dan, thanks for these answers!

Correct me if I'm wrong, but isn't CpMac(1) and MvMac(1) part of the darwin distribution/tools?


-Scott

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >Metadata support (From: Tomas Zahradnicky <email@hidden>)
 >Re: Metadata support (From: Q <email@hidden>)
 >Re: Metadata support (From: Dan Shoop <email@hidden>)
 >Re: Metadata support (From: Boyd Waters <email@hidden>)
 >Re: Metadata support (From: Dan Shoop <email@hidden>)
 >Re: Metadata support (From: Boyd Waters <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.