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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1:   //   // Basic filesystem monitor.   // - // $Id: basic.pike,v 1.5 2009/07/14 16:33:49 grubba Exp $ + // $Id: basic.pike,v 1.6 2009/07/15 13:07:08 grubba Exp $   //   // 2009-07-09 Henrik Grubbström   //      //! Basic filesystem monitor.   //!   //! This module is intended to be used for incremental scanning of   //! a filesystem.      //! The default maximum number of seconds between checks of directories
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:130:   //! Called by @[check()] and @[check_monitor()].   //!   //! Overload this to do something useful.   void file_deleted(string path);      //! Stable change callback.   //!   //! @param path   //! Path of the file or directory that has stopped changing.   //! + //! @param st + //! Status information for @[path] as obtained by @expr{file_stat(path, 1)@}. + //!   //! This function is called when previous changes to @[path] are   //! considered "stable".   //!   //! "Stable" in this case means that there have been no detected   //! changes for at lease @[stable_time] seconds.   //!   //! Called by @[check()] and @[check_monitor()].   //!   //! Overload this to do something useful. - void stable_data_change(string path); + void stable_data_change(string path, Stdio.Stat st);      //! Flags for @[Monitor]s.   enum MonitorFlags {    MF_RECURSE = 1,    MF_AUTO = 2,    MF_INITED = 4,   };      //! Monitoring information.   protected class Monitor(string path,
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:493:    file = Stdio.append_path(m->path, file);    Monitor m2 = monitors[file];    if (m2) {    check_monitor(m2, flags);    }    }    }    if (m->last_change < time(1) - stable_time) {    m->last_change = 0x7fffffff;    if (stable_data_change) { -  stable_data_change(m->path); +  stable_data_change(m->path, st);    }    return 1;    }    return 0;   }      //! Check for changes.   //!   //! @param max_wait   //! Maximum time in seconds to wait for changes. @expr{-1}