pike.git / lib / modules / Filesystem.pmod / Monitor.pmod / basic.pike

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:4:   // Basic filesystem monitor.   //   //   // 2009-07-09 Henrik Grubbström   //   //! Basic filesystem monitor.   //!   //! This module is intended to be used for incremental scanning of   //! a filesystem.   //! - //! Supports FSEvents on MacOS X and Inotify on Linux to provide low overhead monitoring; other - //! systems use a less efficient polling approach. + //! Supports FSEvents on MacOS X and Inotify on Linux to provide low + //! overhead monitoring; other systems use a less efficient polling approach. + //! + //! @seealso + //! @[System.FSEvents], @[System.Inotify]      //   // some necessary setup activities for systems that provide filesystem event monitoring   //   #if constant(System.FSEvents.EventStream)   #define HAVE_EVENTSTREAM 1   #endif      #if constant(System.Inotify)   #define HAVE_INOTIFY 1
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:46:       void inotify_parse(mixed id, string data)    {    while (sizeof(data)) {    array a;    mixed err = catch {    a = System.Inotify.parse_event(data);    };       if (err) { -  // TODO: might have a partial even struct here which gets completed +  // TODO: might have a partial event struct here which gets completed    // by the next call?? maybe add an internal buffer.    werror("Could not parse inotify event: %s\n", describe_error(err));    return;    }    string path;    path = a[3];    if(path && monitors[path])    {    monitors[path]->check(0);    }