Thanks Scott,

this is helpful and good to know. In the meantime I have played a little with 
lsof on the command line, and it seems to sort of answer the question wether or 
not someone has a file open with authority... but it's very slow.

Just to enlighten me, why can't there be no absolute way to know when a file 
has been completed? I'm not doubting you, just trying to learn... is it because 
you can't predict what's going to happen right the second after you look?

Your idea to have the other app flag me makes a lot of sense to me, thanks 
again,

Rainer


On Apr 10, 2011, at 17:53, Scott Ribe wrote:

> On Apr 10, 2011, at 5:57 PM, Rainer Standke wrote:
> 
>> Is there any way to tell if a file is done being written?
> 
> In general, no. There are lots of "maybe kind of" solutions, including trying 
> to open for exclusive access. But there is absolutely no way, nor can there 
> be, to know when to read a file that is being written by another app--which 
> is what I think you're asking for--unless the other app provides some 
> protocol for that.
> 
> -- 
> Scott Ribe
> scott_r...@elevated-dev.com
> http://www.elevated-dev.com/
> (303) 722-0567 voice
> 
> 
> 
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to