Bob Ippolito (@etrepum) on Haskell, Python, Erlang, JavaScript, etc.

Mac OS X 10.4 (Tiger)'s copyfile()


All of the snazzy ACL-and-metadata-copying features in Darwin 8 / Tiger live in one function, copyfile(). Unfortunately, Apple forgot to include the header for it in the version of Xcode that ships with Mac OS X 10.4.

It is defined in libSystem, so you can use it if you knew its prototype, and you can pick up the copyfile.h (may not be newest!) from the Libc package from Darwin releases.

Since this isn't a static library, and probably depends on New Stuff, using it in a backwards compatible way (i.e. to get resource-fork copying in Panther) probably isn't going to work. Oh well.