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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:333:    //!    //! @note    //! For directories, @[file_created()] will be called for the subpaths    //! before the call for the directory itself. This can be used to detect    //! when the initialization for a directory is finished.    //!    //! Called by @[check()] and @[check_monitor()] the first time a monitored    //! path is checked (and only if it exists).    protected void file_exists(string path, Stdio.Stat st)    { +  int t = time(1);    call_callback(global::file_exists, path, st); -  +  if (st->mtime + (stable_time || global::stable_time) >= t) { +  // Not stable yet! We guess that the mtime is a +  // fair indication of when the file last changed. +  last_change = st->mtime;    } -  +  }       //! File creation callback.    //!    //! @param st    //! Status information for @[path] as obtained by    //! @expr{file_stat(path, 1)@}.    //!    //! This function is called when either a monitored path has started    //! existing, or when a new file or directory has been added to a    //! monitored directory.