I believe that OS X creates a placeholder file while the "real" file is being 
copied/worked with. I am not sure what the method would be to determine if the 
process has completed yet. I suspect there is some kind of flag on the file 
itself, read only or a file type reserved for this sort of thing. 

Oddly, this allows you to actually rename a file WHILE IT'S BEING COPIED. You 
may be able to do other things as well. Isn't UNIX wonderful?

Bob

Sent from my iPad

On Apr 5, 2011, at 4:36 AM, "tkuyp...@telenet.be" <tkuyp...@telenet.be> wrote:

> Hi gang,
> 
> I'm stuck, after about 4 hours I have to admit I'm not clever enough for 
> this...
> 
> I'm trying to implement a drop-folder based application.
> When a file is found in the folder, I need to open it and check for some data 
> inside the file.
> 
> The actual code to check inside the file takes about 0.01 seconds, so I get a 
> result almost immediately. When there are files in the folder when I start, 
> it works perfectly.
> 
> But when the process is checking every x seconds if there are files in the 
> folder, thing go wrong: LiveCode sees a file in the folder, while the finder 
> is still copying the file to that folder.
> So when I open the file, to read the content, it might still be empty.
> 
> The files are jpg, CR2 (= raw images) and tiff files, ranging anywhere from 
> 10kb to 30 Mb in size, so copying can take a few minutes.
> 
> And now my question: How do I know if the Finder finished copying? Checking 
> the file size doesn't work.
> 
> Any help is more then welcome
> 
> 
> Warm regards,
> 
> Ton Kuypers
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to