• 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: Automatically mirroring folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically mirroring folders


  • Subject: Re: Automatically mirroring folders
  • From: Greg Guerin <email@hidden>
  • Date: Sun, 19 Jun 2011 15:51:14 -0700

Leonardo wrote:

2) During the period of time the stream is off, if some new files arrive
within the folder /A, I lose the notification to copy it.


How to workaround that?


Make a directory adjacent to /A and /B to use as a staging area for copying. Only copy into the staging area.

http://en.wikipedia.org/wiki/Staging_area

When the copying of a file is complete, get its inode number. Then rename the copy from the staging area into the actual target folder. After the copying is complete, and the rename is ready to occur, ignore all events that have the file's inode number.

  -- GG

_______________________________________________

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


  • Prev by Date: Re: This code is leaking...
  • Next by Date: Re: Release a NSWindowController after the window is closed
  • Previous by thread: Re: Automatically mirroring folders
  • Next by thread: Re: audiounit instrument with cocoa view
  • Index(es):
    • Date
    • Thread