• 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: Using KQueue events to watch files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using KQueue events to watch files


  • Subject: Re: Using KQueue events to watch files
  • From: Keith Ray <email@hidden>
  • Date: Fri, 8 Oct 2004 13:42:12 -0700

> Check out Mike McCracken's stakeout code -
> http://michael-mccracken.net/blog/blosxom.pl/computers/mac/programming/
> meetWatch.html, or Calum's variation at
> http://homepage.mac.com/calumr/main.m

I've had a problem with "folder-watching" in that the app gets
notified of a new file in the folder when the Finder (or whatever)
first creates the file in that folder -- not after the file is
completely written to the folder. If the finder is copying a large
file from a slow server, it could take a while for the file to be
completely written to that folder.

What's worse, unlike MacOS 9 or Windows, is that on MacOS X, opening
and reading the file is allowed even if another process is currently
writing to it. (MacOS X 10.1 used to change the file-type while the
copy was in-process, but 10.2 and 10.3 don't do that, plus we need to
allow users to use other file-copying tools.)

Any idea how we can find out when the file has been closed -- no
longer open in any process?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Create .icns file without Photoshop?
  • Next by Date: Installation error
  • Previous by thread: Re: Using KQueue events to watch files
  • Next by thread: Crypt/Decrypt NSData
  • Index(es):
    • Date
    • Thread