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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:747:    last_change = 0x7fffffff;    stable_data_change(path, st);    return 1;    } else if (last_change != 0x7fffffff &&    st->isdir && status_change(old_st, st, orig_flags, flags)) {    // Directory not stable yet.    last_change = time(1);    update(st);    return 1;    } + #ifdef HAVE_EVENTSTREAM +  else if(orig_flags & MF_RECURSE) +  { +  // if using FSEvents, we won't receive the name of the file changed, +  // so we have to scan for it. +  int caught; +  array(string) files = get_dir(path) || ({}); +  this_program::files = files; +  foreach(files, string file) { +  file = canonic_path(Stdio.append_path(path, file)); +  if (monitors[file]) { +  if(check_monitor(monitors[file])) caught = 1; +  } +  } +  return caught; +  } + #endif /* HAVE_EVENTSTREAM */    return 0;    }   }      //! Canonicalize a path.   //!   //! @param path   //! Path to canonicalize.   //!   //! @returns