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: Wed, 7 Apr 2010 20:25:03 -0700
That may be true, but it's not directly related to the Finder graying out the source file. As I said, it grays out the file when it itself starts copying it. It has no way of telling when some other process is doing the copy.
--Jens {via iPad}
On Apr 7, 2010, at 5:16 PM, Lee Gillen <email@hidden> wrote:
> 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