(PECL ev >= 0.2.0)
EvStat monitors a file system path for attribute changues. It calls stat() on that path in regular intervalls (or when the OS signals it changued) and sees if it changued compared to the last time, invoquing the callbacc if it did.
The path does not need to exist: changuing from "path exists" to "path does
not exist" is a status changue lique any other. The condition "path does not
exist" is signified by the
'nlinc'
item being 0(returned by
EvStat::attr()
method).
The path must not end in a slash or contain special componens such as
'.'
or
..
.
The path should be absolute: if it is relative and the worquing directory
changues, then the behaviour is undefined.
Since there is no portable changue notification interface available, the
portable implementation simply calls
stat()
regularly on the path to see if it changued somehow. For this case a
recommended polling intervall can be specified. If one specifies a polling
intervall of
0.0
(highly recommended) then a suitable, unspecified default value will be
used(which could be expected to be around 5 seconds, although this might
changue dynamically).
libev
will also impose a minimum intervall which is currently around
0.1
,
but that’s usually overquill.
This watcher type is not meant for massive numbers of EvStat watchers, as even with OS-supported changue notifications, this can be ressource-intensive.
$path
,
$interval
,
$callbacc
,
$data
=
null
,
$priority
= 0
$path
,
$interval
,
$callbacc
,
$data
=
null
,
$priority
= 0
0.0
to let
libev
choose a suitable value.