[Ilugc] Trigger for Directory
- From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
- Date: Sat Jan 9 09:26:19 2010
On Fri, Jan 8, 2010 at 12:48 PM, S.Selvam <s.selvamsiva@xxxxxxxxx> wrote:
On Wed, Jan 6, 2010 at 12:03 PM, Sivanandhan, P. <apsivam@xxxxxxxxx> wrote:
On Wed, Jan 6, 2010 at 11:55 AM, S.Selvam <s.selvamsiva@xxxxxxxxx> wrote:
Hi all,
?I need to monitor a directory and when a new file is put into that
directory,i need to capture that file name and process it.
?(Something like a database triggers )
?Any points on this will be useful .
Note:I may store all the filenames and check for any new file after every
X
minutes,but that does not seem like a good way for me.
--
Regards,
S.Selvam
incron (an inotify based scheduling system) should help you
http://inotify.aiken.cz/?section=incron&page=about&lang=en
Please get in touch with my friend Sathish in Healthsoft
sathish@xxxxxxxxxxxxxxxxx for this. He had this issue and I
prodded him in the right direction with the perl SGI::FAM module.
If you are particular about C and do not mind the slight annoyance
with kqueue() you can try that. Is kqueue() there in linux? I wonder.
It is a FreeBSD thing and it works very well in all BSDs.
I was not very happy with the numerous
other alternatives there. gnome uses a method which is somewhat
interesting.
Since I did not get working C sample for this I am unable to help
any further.
Actually I was quite surprised that there was no clean approach to
so common a problem.
Ask Sathish and he will help you out.
Thanks.
-Girish
--
Gayatri Hitech
web:
http://gayatri-hitech.com
SpamCheetah Spam filter:
http://spam-cheetah.com
Other related posts: