ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.pm
(Generate patch)

Comparing EV/EV.pm (file contents):
Revision 1.56 by root, Tue Nov 27 10:59:10 2007 UTC vs.
Revision 1.57 by root, Wed Nov 28 17:32:24 2007 UTC

576as even with OS-supported change notifications, this can be 576as even with OS-supported change notifications, this can be
577resource-intensive. 577resource-intensive.
578 578
579The C<stat_ns> variant doesn't start (activate) the newly created watcher. 579The C<stat_ns> variant doesn't start (activate) the newly created watcher.
580 580
581=item ... = $w->stat
582
583This call is very similar to the perl C<stat> built-in: It stats (using
584C<lstat>) the path specified in the watcher and sets perls stat cache (as
585well as EV's idea of the current stat values) to the values found.
586
587In scalar context, a boolean is return indicating success or failure of
588the stat. In list context, the same 13-value list as with stat is returned
589(except that the blksize and blocks fields are not reliable).
590
591In the case of an error, errno is set to C<ENOENT> (regardless of the
592actual error value) and the C<nlink> value is forced to zero (if the stat
593was successful then nlink is guaranteed to be non-zero).
594
595See also the next two entries for more info.
596
597=item ... = $w->attr
598
599Just like C<< $w->stat >>, but without the initial stat'ing: this returns
600the values most recently detected by EV. See the next entry for more info.
601
602=item ... = $w->prev
603
604Just like C<< $w->stat >>, but without the initial stat'ing: this returns
605the previous set of values, before the change.
606
607That is, when the watcher callback is invoked, C<< $w->prev >> will be set
608to the values found I<before> a change was detected, while C<< $w->attr >>
609returns the values found leading to the change detection. The difference (if any)
610between C<prev> and C<attr> is what triggered the callback.
611
612If you did something to the filesystem object and do not want to trigger
613yet another change, you can call C<stat> to update EV's idea of what the
614current attributes are.
615
581=item $w->set ($path, $interval) 616=item $w->set ($path, $interval)
582 617
583Reconfigures the watcher, see the constructor above for details. Can be 618Reconfigures the watcher, see the constructor above for details. Can be
584called at any time. 619called at any time.
585 620

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines