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

Comparing EV/README (file contents):
Revision 1.13 by root, Tue Nov 27 16:35:47 2007 UTC vs.
Revision 1.14 by root, Wed Nov 28 19:22:16 2007 UTC

468 resource-intensive. 468 resource-intensive.
469 469
470 The "stat_ns" variant doesn't start (activate) the newly created 470 The "stat_ns" variant doesn't start (activate) the newly created
471 watcher. 471 watcher.
472 472
473 ... = $w->stat
474 This call is very similar to the perl "stat" built-in: It stats
475 (using "lstat") the path specified in the watcher and sets perls
476 stat cache (as well as EV's idea of the current stat values) to the
477 values found.
478
479 In scalar context, a boolean is return indicating success or failure
480 of the stat. In list context, the same 13-value list as with stat is
481 returned (except that the blksize and blocks fields are not
482 reliable).
483
484 In the case of an error, errno is set to "ENOENT" (regardless of the
485 actual error value) and the "nlink" value is forced to zero (if the
486 stat was successful then nlink is guaranteed to be non-zero).
487
488 See also the next two entries for more info.
489
490 ... = $w->attr
491 Just like "$w->stat", but without the initial stat'ing: this returns
492 the values most recently detected by EV. See the next entry for more
493 info.
494
495 ... = $w->prev
496 Just like "$w->stat", but without the initial stat'ing: this returns
497 the previous set of values, before the change.
498
499 That is, when the watcher callback is invoked, "$w->prev" will be
500 set to the values found *before* a change was detected, while
501 "$w->attr" returns the values found leading to the change detection.
502 The difference (if any) between "prev" and "attr" is what triggered
503 the callback.
504
505 If you did something to the filesystem object and do not want to
506 trigger yet another change, you can call "stat" to update EV's idea
507 of what the current attributes are.
508
473 $w->set ($path, $interval) 509 $w->set ($path, $interval)
474 Reconfigures the watcher, see the constructor above for details. Can 510 Reconfigures the watcher, see the constructor above for details. Can
475 be called at any time. 511 be called at any time.
476 512
477 $current_path = $w->path 513 $current_path = $w->path

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines