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: "Paul Sanders" <email@hidden>
- Date: Thu, 8 Apr 2010 19:32:00 +0100
Maybe poll the file size when you get your event and wait for it
to stop changing.
Paul Sanders.
----- Original Message -----
From: "Lee Gillen" <email@hidden>
To: "Jens Alfke" <email@hidden>
Cc: "Apple Developer Mailing List" <email@hidden>
Sent: Thursday, April 08, 2010 7:08 PM
Subject: Re: How does Finder determine when a file is busy being
written to the disk?
My app watches a folder using FSEvents to see when files are
added to
it and then uploads those files to a server. It's kind of like a
hot
folder. The issue is that when users are copying large files,
especially from a network drive, the upload will begin before
the file
has been completely written to the disk.
'fuser' is a command line utility that tell you what app PID has
the
file open. I see that if I pass 'fuser' the file path I see that
Finder has the file open.
_______________________________________________
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