On Sat, 2002-08-17 at 16:04, Leopoldo Centore wrote:
> Thanks for your help, it works fine.
>
> But I have another problem to resolve :
>
> The files that arrive in the directories source must be copied in
> directories destination.
>
> I have noticed that FAMCreated is emitted immediately and not when the
> process of copy is finished,
> while FAMChanged is emitted during the writing process more times.
>
> In this way, if the file size is large, there is the possibility that only
> a partial file is copied.
>
> How can I avoid that this happens?
>
> I need the signal after the file has been entirely copied in the source
> directory.
I don't think there's a way to do that using FAM, since it can only tell
you when something changed, and not when something doesn't change :)
Maybe you could queue the copy operation for the files and start the
copying when you haven't seen any FAMChanged's for a reasonable amount
of time (i.e. sort of an idle handler)?
Cheers,
Christian.
--
________________________________________________________________________
http://www.whoop.org
--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx
|