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: Lee Gillen <email@hidden>
- Date: Wed, 7 Apr 2010 20:16:30 -0400
On Wed, Apr 7, 2010 at 7:53 PM, Jens Alfke <email@hidden> wrote:
> I think the Finder only knows that because it's the one doing the copying.
> If something else is copying a file (like the 'cp' command) the Finder
> doesn't gray out the file.
But I think what is happening is there is an FSEvent when the
placeholder file is created at the destination. This file has a file
size of 0 bytes. When the file is finished being written the file is
swapped out with the placeholder file. This raises a 2nd FSEvent.
Reading the file size on the second event shows the full file size.
It looks to me like 'cp' doesn't show the file at all until it is
finished writing.
_______________________________________________
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