Re: File event notification
Re: File event notification
- Subject: Re: File event notification
- From: Ardian Lazuardi <email@hidden>
- Date: Fri, 24 Oct 2008 17:10:00 +0900
Is it impossible to hook the copy procedures, such like windows
programmers using shellhook, cbthook, or api hook, so that we can
intercept the process before system does?
By using FSEvent, we can get the changed folder path. Can we get the
modified filename exactly (deleted file's filename, created file'
filename, etc) ?
Regards,
Ardian
On Thu, Oct 23, 2008 at 11:44 PM, Michael Ash <email@hidden> wrote:
> Can't be done. The system has no concept of "copy". A copy simply
> means that you read the contents from A, and then write them to B.
But
> there's no inherent link between the reading and the writing. In
other
> words, when I'm writing out the contents to B, the system has no way
> of tracking that those contents did, in fact, come from A. To
> illustrate, I can copy a file by using the Finder, by using Save As
in
> an app, or by doing something like "tar -cf - A | tar -C B -xf -" at
> the command line. There's simply no way the system is going to be
able
> to tell you where the new file "came from", in the sense that a human
> would interpret it.
... and a move between volumes is actually a copy + delete. So again,
no fool proof way to track.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden