Mac OS X HFS+ metadata patch, take 2
Julian Cowley
julian at lava.net
Tue Aug 17 22:15:48 GMT 2004
On Mon, 16 Aug 2004, D Andrew Reynhout wrote:
> Several months ago, I posted my first pass at a patch to transfer
> Mac OS X HFS+ metadata (resource forks and Finder metadata) to
> non-HFS+ filesystems (Linux, Solaris, etc).
>
> I finally got a chance to update the patch to reflect suggestions
> offered on the list. Thanks for the ideas, this version should be
> a big improvement.
>
> The diff and a binary (and a fuller explanation) can be found at:
> http://www.quesera.com/~reynhout/misc/rsync-hfsmode-patch
>
> The current patch is against rsync-2.6.2. It still works with the
> standard build of rsync on the receiving side, so only the sender
> needs to be patched.
>
> For a single HFS+ file, there will be between one and three files
> transferred to the destination filesystem:
>
> - <filename>: The regular file (data fork)
> - ._<filename>: The resource fork of <filename>, iff non-empty.
> - ._<filename>_metadata: Type and Creator and Finder flags
> for <filename>, iff non-null.
>
> Any suggestions on a naming scheme for the metadata file that
> would minimize the risk of collisions?
Any reason this couldn't use the same convention that Apple uses on UFS
partitions? That is, files are stored using AppleDouble format, with the
resource fork and metadata in a separate file with "._" prepended to the
filename. There is no need for a "_metadata" file as the type, creator,
etc. are stored along with the resource fork.
If rsync could be made aware of this format, it would allow transfers to
and from Apple UFS partitions (as well as remote systems) in a way
compatible with Finder and other utilities such as ditto.
For more on AppleDouble format, see:
http://www.lazerware.com/formats/
--
In the Year 2000 (tm)... "I will convert to Judasism and change my
trademark Fa Shizzle My Nizzle to Sheiztle Fa Zeitzel." -- Snoop Dog
More information about the rsync
mailing list