Initial commit
This commit is contained in:
13
examples/example.php
Normal file
13
examples/example.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
$in = new NoccyLabs\React\Inotify\Inotify();
|
||||
|
||||
$in->on("event", function ($event) {
|
||||
var_dump($event);
|
||||
});
|
||||
|
||||
$in->addWatch(__DIR__, IN_CREATE|IN_DELETE);
|
||||
|
||||
echo "Create and delete a file in the current directory and observe the output.\n";
|
||||
Reference in New Issue
Block a user