• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File event notification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File event notification


  • Subject: Re: File event notification
  • From: "Michael Ash" <email@hidden>
  • Date: Fri, 24 Oct 2008 00:44:37 -0400

On Fri, Oct 24, 2008 at 12:16 AM, Ardian Lazuardi
<email@hidden> wrote:
>
> Hello,
>
> Apparently I need to add a function that letting us know the changes in a
> volume.
>
> I want to log any activities within my volume.
> e.g. :
> - file copied from Volume A to Volume B
> - file moved from Volume A to Volume B
> - file deleted from Volume B
> - file opened by an application
> - etc...
>
> In leopard I can watch the changes in a folder by using FSEvent. But I
> didn't get the source path when I copy file from A to B.  It only notifies
> me that B has changed.
>
> What I need is to get the source and destination path when any file copied
> or moved.
>
> Is there anyone have clue for this problem?

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.

Mike
_______________________________________________

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

  • Follow-Ups:
    • Re: File event notification
      • From: "Stephen J. Butler" <email@hidden>
References: 
 >File event notification (From: Ardian Lazuardi <email@hidden>)

  • Prev by Date: Passing data to a different nib
  • Next by Date: Re: File event notification
  • Previous by thread: File event notification
  • Next by thread: Re: File event notification
  • Index(es):
    • Date
    • Thread