… | |
… | |
2606 | |
2606 | |
2607 | =head2 C<ev_stat> - did the file attributes just change? |
2607 | =head2 C<ev_stat> - did the file attributes just change? |
2608 | |
2608 | |
2609 | This watches a file system path for attribute changes. That is, it calls |
2609 | This watches a file system path for attribute changes. That is, it calls |
2610 | C<stat> on that path in regular intervals (or when the OS says it changed) |
2610 | C<stat> on that path in regular intervals (or when the OS says it changed) |
2611 | and sees if it changed compared to the last time, invoking the callback if |
2611 | and sees if it changed compared to the last time, invoking the callback |
2612 | it did. |
2612 | if it did. Starting the watcher C<stat>'s the file, so only changes that |
|
|
2613 | happen after the watcher has been started will be reported. |
2613 | |
2614 | |
2614 | The path does not need to exist: changing from "path exists" to "path does |
2615 | The path does not need to exist: changing from "path exists" to "path does |
2615 | not exist" is a status change like any other. The condition "path does not |
2616 | not exist" is a status change like any other. The condition "path does not |
2616 | exist" (or more correctly "path cannot be stat'ed") is signified by the |
2617 | exist" (or more correctly "path cannot be stat'ed") is signified by the |
2617 | C<st_nlink> field being zero (which is otherwise always forced to be at |
2618 | C<st_nlink> field being zero (which is otherwise always forced to be at |