On Oct 13, 2007, at 4:07 PM, Wesley W. Terpstra wrote:
rsync 3pre2 now handles all but three items:
1. bsd flags
2. "locked flag" (supposedly finder meta-data)
3. creation date

The creation date is AFAIK a mac os specific piece of meta-data and can be accessed via the set/getattrlist + ATTR_CMN_CRTIME system call on a mac. Again, this meta-data might be reasonably converted into an extended attribute.

I've attached a patch which does this. Currently resource forks and finder info get placed into an extended attribute transparently by osx (com.apple.{ResourceFork/FinderInfo}). This patch makes another "extended attribute" called com.apple.CreationDate. The only issue I've found so far is that it gives warning when copying a symlink to linux as one can't set extended attributes there. It even works when copying from hfs to fat32 on the same mac. I don't understand where osx saves the creation date in a fat filesystem, but somehow it works!?

I admit it's a bit hack-ish to put this in the extended attribute get/ set methods, but this mimics the behaviour of the other osx-specific meta-data. Also, it seems reasonable to me that it should be copied when '-X' is specified. There is no fgetattrlist method, but it seems that sys_fgetxattr is actually never used b/c x_fstat is not used.

Attachment: creation-date.patch
Description: Binary data

-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to