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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:849: Inside #if HAVE_EVENTSTREAM
   System.FSEvents.EventStream(({}), 1.0,    System.FSEvents.kFSEventStreamEventIdSinceNow,    flags);    eventstream->callback_func = eventstream_callback;    } else {    string found;    foreach(eventstream_paths;;string p) {    if((path == p) || has_prefix(path, p + "/")) {    MON_WERR("Path %O already monitored via path %O.\n", path, p);    found = p; +  break;    }    }    if (found) {    MON_WERR("Path %O is accellerated via %O.\n", path, found);    accellerated = 1; -  +  monitors[path] = this;    check();    return;    }    }       mixed err = catch {    MON_WERR("Adding %O to the set of monitored paths.\n", path);    eventstream_paths += ({path});    if(eventstream->is_started())    eventstream->stop();    eventstream->add_path(path);    eventstream->start();    };       if (!err) { -  +  monitors[path] = this;    check();    return;    }       werror (describe_backtrace (err));    // Note: falling through to ::register_path() below.      #endif /* !INHIBIT_EVENTSTREAM_MONITOR */    // NB: Eventstream doesn't notify on the monitored path;    // only on its contents.