On Sat, Dec 19, 2009 at 7:08 PM, Albert Lee <tr...@opensolaris.org> wrote:

> On Sat, 19 Dec 2009 18:33:16 +0100, Vincent Torri
> <vincent.to...@gmail.com>
> wrote:
> > On Sat, Dec 19, 2009 at 6:27 PM, Albert Lee <tr...@opensolaris.org>
> wrote:
> >
> >> On Sat, 19 Dec 2009 08:22:54 +0100, Vincent Torri
> >> <vincent.to...@gmail.com>
> >> wrote:
> >> > On Sat, Dec 19, 2009 at 4:47 AM, Albert Lee <tr...@opensolaris.org>
> >> wrote:
> >> >
> >> >> On Sat, 19 Dec 2009 00:38:23 +0100, Vincent Torri
> >> >> <vincent.to...@gmail.com>
> >> >> wrote:
> >> >> > On Mon, Aug 24, 2009 at 4:54 PM, Vincent Torri
> >> >> > <vincent.to...@gmail.com>wrote:
> >> >> >
> >> >> >>
> >> >> >>
> >> >> >> On Mon, Aug 24, 2009 at 3:23 PM, Darren J Moffat
> >> >> >> <darr...@opensolaris.org>wrote:
> >> >> >>
> >> >> >>> Vincent Torri wrote:
> >> >> >>>
> >> >> >>>> Hey,
> >> >> >>>>
> >> >> >>>> I would like to know how I can notify the file system on
> >> >> >>>> OpenSolaris.
> >> >> >>>> The
> >> >> >>>> low level API on linux is Inotify (it's a kernel module), and
> on
> >> >> >>>> Windows, it
> >> >> >>>> is ReadDirectoryChangeW||. Which one is it with OpenSolaris ?
> >> >> >>>>
> >> >> >>>
> >> >> >>> You need to use the port event system.
> >> >> >>>
> >> >> >>> See port_create(3C), port_associate(3C)
> >> >> >>>
> >> >> >>> [snip]
> >> >> >>
> >> >> >> thanks to both of you, that's exactly what I want
> >> >> >>
> >> >> >> actually, i am now trying to implement what i want,  and it seems
> >> that
> >> >> > there is no way to know if a file has been created.
> >> >> >
> >> >> > from here:
> http://blogs.sun.com/praks/entry/file_events_notification
> >> >> there
> >> >> > is no 'created' event to watch. Am I  wrong ?
> >> >> >
> >> >>
> >> >> You'll have to rewinddir() and readdir() on a FILE_MODIFIED event.
> >> >> This
> >> >> does present a scalability problem for large directories.
> >> >>
> >> >
> >> > indeed, it does. We already have a file monitoring based on listing
> >> files,
> >> > which works well. I think i'll use it instead of using FEN.
> >>
> >>
> >> Eh? How would you get notified of file create/delete without FEN?
> >>
> >> by doing exactly what is proposed: keeping in a list all the files and
> >> see
> > if one is removed or added. But without using that useless API.
>
> That specifies how you would handle the event, not how you receive events.
> You still need FEN to inform your application *when* a directory event
> occurs.
>

no. Polling every a certain amount of time. It takes time and ressource of
course, but FEN too.
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to