Branch: Tag:

2009-07-15

2009-07-15 13:07:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

stable_data_change() now gets a Stdio.Stat as the second parameter.

Rev: lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1.6

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   //
137:   //! @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".   //!
146:   //! 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 {
500:    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;    }