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.38 2010/04/27 15:00:54 grubba Exp $ + // $Id$   //   // 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:303:       //! Bump the monitor to an earlier scan time.    //!    //! @param seconds    //! Number of seconds to bump. Defaults to @expr{30@}.    void bump(int|void flags, int|void seconds)    {    next_poll -= seconds || 30;    monitor_queue->adjust(this);    -  if ((flags & MF_RECURSE) && st->isdir && files) { +  if ((flags & MF_RECURSE) && st && st->isdir && files) {    // Bump the files in the directory as well.    foreach(files, string file) {    file = canonic_path(Stdio.append_path(path, file));    Monitor m2 = monitors[file];    if (m2) {    m2->bump(flags, seconds);    }    }    }    }