xref: /php-uv/tests/320-fs-event.phpt (revision 79d8aaa0)
1--TEST--
2Check for fs event
3--FILE--
4<?php
5define("DIRECTORY_PATH", dirname(__FILE__) . "/fixtures/example_directory");
6
7$ev = uv_fs_event_init(uv_default_loop(), dirname(DIRECTORY_PATH), function($rsc, $name, $event, $stat) {
8  var_dump($name);
9  uv_close($rsc);
10}, 0);
11
12uv_fs_mkdir(uv_default_loop(), DIRECTORY_PATH, 0755, function($result) {
13    @rmdir(DIRECTORY_PATH);
14});
15
16uv_run();
17--EXPECT--
18string(17) "example_directory"
19