• 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: How does Finder determine when a file is busy being written to the disk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does Finder determine when a file is busy being written to the disk?


  • Subject: Re: How does Finder determine when a file is busy being written to the disk?
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 8 Apr 2010 10:58:36 -0700


On Apr 8, 2010, at 10:53 AM, Lee Gillen wrote:

Is there anyway for my app to see that the file is being written to? I
was thinking of looking at 'fuser' or trying to open the file in write
mode as a test.

I don't know what 'fuser' is. Opening the file in write mode will always succeed; Unix doesn't have the concept of a 'busy' file. If the Finder uses an exclusive lock on the file while it's being written to, then you could attempt to open the file with an exclusive lock, and it would fail if the Finder already had the file locked. (This is all standard Unix file stuff that you could learn more about from books or online references...)


Maybe you should describe in detail what you're trying to do? There might be a better way to approach the problem.

—Jens_______________________________________________

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: How does Finder determine when a file is busy being written to the disk?
      • From: Lee Gillen <email@hidden>
References: 
 >How does Finder determine when a file is busy being written to the disk? (From: Lee Gillen <email@hidden>)
 >Re: How does Finder determine when a file is busy being written to the disk? (From: Jens Alfke <email@hidden>)
 >Re: How does Finder determine when a file is busy being written to the disk? (From: Lee Gillen <email@hidden>)
 >Re: How does Finder determine when a file is busy being written to the disk? (From: Jens Alfke <email@hidden>)
 >Re: How does Finder determine when a file is busy being written to the disk? (From: Lee Gillen <email@hidden>)

  • Prev by Date: Re: How does Finder determine when a file is busy being written to the disk?
  • Next by Date: Re: How does Finder determine when a file is busy being written to the disk?
  • Previous by thread: Re: How does Finder determine when a file is busy being written to the disk?
  • Next by thread: Re: How does Finder determine when a file is busy being written to the disk?
  • Index(es):
    • Date
    • Thread