Slava,

Here's the signature for 'next-change'

     : next-change ( monitor -- path changed )

I think it should return a tuple representing a file system change which 
encapsulates those two return values. So for example:

     TUPLE: file-system-change path descriptor ;

Also, I think it should be easier to kick off a monitor on a directory, 
running a quotation for each change. Given a word 'next-change*' which 
returns a 'file-system-change' tuple, this word accomplishes this:

: monitor-directory ( path quot -- )
   '[ _ t <monitor> [ next-change* _ call ] curry loop ] with-monitors ;

So for example:

   home [ . t ] monitor-directory

will output change information for the home directory in the listener.

Ed

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to