Re: Metadata support
Re: Metadata support
- Subject: Re: Metadata support
- From: Dan Shoop <email@hidden>
- Date: Sun, 25 Jun 2006 13:50:29 -0400
At 6:02 PM +1000 6/25/06, Q wrote:
On 25/06/2006, at 8:05 AM, Tomas Zahradnicky wrote:
Hello,
I've noticed that tar is able to store files' metadata and in order
to preserve it, it adds ._FILENAME file that appears to store
FileInfo and file's resource fork if there's one. Anyone knows if
this process is somewhere documented including the information it
stores beyond the raw resource fork?
Check out copyfile() included in the LibC library on tiger. The
source file copyfile.c (in the LibC source bundle from ADC) will
tell you everything you need to know about what's in those '._*'
files.
My app uses libtar and when I extract everything, I need to
recombine ._files back into their owners. I have written something
that appears to work but would like to be sure I restored
everything I had to.
If you are making a tiger only app you can just use copyfile()
included in LibC, this is what the tiger unix tools like tar, cp,
rsync, etc use.
However copyfile() doesn't seem to preserve *all* the complete,
necessary and expected data associated with Mac HFS[+] files nor does
the ._file mechanism. Specifically symlink ownership, creation date,
and file ID info for Aliases will get clobbered. And there's also
Finder information and Spotlight data stored in the .DS_Store's
And currently (10.4.6) there appears to be no shipping tool that can
copy a file completely. ASR, hdiutil, ditto, cp (and copyfile()
reliant mechanisms) all miss something. Sometimes rather badly.
It would be nice if Apple would at least stuff the creation date in
the ._file under OS X. :(
--
-dhan
------------------------------------------------------------------------
Dan Shoop AIM: iWiring
Systems & Networks Architect http://www.ustsvs.com/
email@hidden http://www.iwiring.net/
1-714-363-1174
pgp key fingerprint: FAC0 9434 B5A5 24A8 D0AF 12B1 7840 3BE7 3736 DE0B
iWiring provides systems and networks support for Mac OS X, unix, and
Open Source application technologies at affordable rates.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden