Skip to content

Instantly share code, notes, and snippets.

@cxa
Last active Dec 11, 2015
Embed
What would you like to do?
int fiddle = open("DOCUMENT_DIRECTORY", O_EVTONLY);
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_source_t source = dispatch_source_create(DISPATCH_SOURCE_TYPE_VNODE, fiddle, DISPATCH_VNODE_WRITE, queue);
dispatch_source_set_event_handler(source, ^{
// how to determine if a file has finished copying?
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment