Re: DirWatch

2008-06-05 Thread Uli Kusterer
Am 23.05.2008 um 04:08 schrieb Jens Alfke: On 22 May '08, at 4:33 PM, Jerry Krinock wrote: Don't do that. The solution for this problem has been built into the system since Mac OS 10.2 or .3, as noted by Robert: UKQueue by Uli http://www.zathras.de/angelweb/sourcecode.htm We're going in

Re: DirWatch

2008-05-23 Thread Robert Cerny
On 23.5.2008, at 6:42, Ken Thomases wrote: On May 22, 2008, at 10:56 PM, Ken Thomases wrote: On May 22, 2008, at 6:57 PM, Lorenzo wrote: I can't. Think about the FNSubscribe tells me that there is something new because the user copied 2 new files into that folder, but only one file is

Re: DirWatch

2008-05-23 Thread Lorenzo
], Cocoa Development cocoa-dev@lists.apple.com Subject: Re: DirWatch On May 22, 2008, at 10:56 PM, Ken Thomases wrote: On May 22, 2008, at 6:57 PM, Lorenzo wrote: I can't. Think about the FNSubscribe tells me that there is something new because the user copied 2 new files

Re: DirWatch

2008-05-23 Thread Simon Wolf
On 23 May 2008, at 00:33, Jerry Krinock wrote: On 2008 May, 22, at 15:45, Robert Cerny wrote: On 23.5.2008, at 0:32, Lorenzo wrote: I need to watch at a given folder and check whenever a new file has been copied therein. At the beginning, I fired a timer periodically getting the list

Re: DirWatch

2008-05-23 Thread Ken Thomases
On May 23, 2008, at 2:37 AM, Lorenzo wrote: Thank you so much Ken, I would like to use the BSD/POSIX file access routines. Wait, what? Why? The BSD/POSIX routines are the ones which _won't_ (by default) be useful for detecting if a file is still open in another program. If you attempt

DirWatch

2008-05-22 Thread Lorenzo
Hi, I need to watch at a given folder and check whenever a new file has been copied therein. At the beginning, I fired a timer periodically getting the list of the contents of that folder with directoryContentsAtPath But soon I discovered that the list includes files still in copying (not

Re: DirWatch

2008-05-22 Thread Robert Cerny
On 23.5.2008, at 0:32, Lorenzo wrote: Hi, I need to watch at a given folder and check whenever a new file has been copied therein. At the beginning, I fired a timer periodically getting the list of the contents of that folder with directoryContentsAtPath But soon I discovered that

Re: DirWatch

2008-05-22 Thread Jerry Krinock
On 2008 May, 22, at 15:45, Robert Cerny wrote: On 23.5.2008, at 0:32, Lorenzo wrote: I need to watch at a given folder and check whenever a new file has been copied therein. At the beginning, I fired a timer periodically getting the list of the contents of that folder with

Re: DirWatch

2008-05-22 Thread Lorenzo
Subject: Re: DirWatch On 22 May '08, at 3:32 PM, Lorenzo wrote: Here I get the notification only after a file has been totally copied into the folder, but I can't yet find the way to know which file has been copied. Do you know how to get that info? Thanks. Just remember the previous

Re: DirWatch

2008-05-22 Thread Jens Alfke
On 22 May '08, at 4:33 PM, Jerry Krinock wrote: Don't do that. The solution for this problem has been built into the system since Mac OS 10.2 or .3, as noted by Robert: UKQueue by Uli http://www.zathras.de/angelweb/sourcecode.htm We're going in circles now. Lorenzo already said in his

Re: DirWatch

2008-05-22 Thread Ken Thomases
On May 22, 2008, at 6:57 PM, Lorenzo wrote: I can't. Think about the FNSubscribe tells me that there is something new because the user copied 2 new files into that folder, but only one file is totally copied, the other one is still in copying. So now I scan the folder with

Re: DirWatch

2008-05-22 Thread Ken Thomases
On May 22, 2008, at 10:56 PM, Ken Thomases wrote: On May 22, 2008, at 6:57 PM, Lorenzo wrote: I can't. Think about the FNSubscribe tells me that there is something new because the user copied 2 new files into that folder, but only one file is totally copied, the other one is still in