Re: How does Finder determine when a file is busy being written to the disk?
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