Accessing <quarantine.h> and working with file quarantine data
Accessing <quarantine.h> and working with file quarantine data
- Subject: Accessing <quarantine.h> and working with file quarantine data
- From: Dragan Milić <email@hidden>
- Date: Fri, 16 Aug 2013 19:37:15 +0200
Hello,
I'd like to know if it is possible to somehow include <quarantine.h> into my own source files. That header seems to be private and it declares a family of qtn_XXX_XXX() functions I'd like to access. Is that possible?
What I actually want to do is to compile a modified version of the "copyfile.c" file I downloaded from Darwin sources. I'm working on an application which has to be able to copy files and I use copyfile() API for that, but due some issues I want to use modified version of this source file. The file includes <quarantine.h> header which is not accessible to regular development environment. I tried to link against all libraries which looked like sensible candidates (like libquarantine.dylib), but it didn't help.
I can do the trick and change #ifdef macro to actually avoid this header file and also declare quarantine functions not to do anything (like the original source does for TARGET_OS_EMBEDDED) but that way I lose possibility to preserve quarantine data; if I copy a file which has some quarantine data attached, those are discarded from the destination file.
If there is some other way to handle file quarantine data (preferably still in the POSIX/BSD layer), I'd like to hear about.
I'd like to avoid typing a long story here, but if anyone's interested in why I need modified version of "copyfile.c", I can post it here. There's one bug and some performance issues (which I'd also like to discuss, perhaps here, so if anyone's interested…).
Thanks,
-- Dragan
_______________________________________________
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