Skip to content
This repository was archived by the owner on Jun 17, 2020. It is now read-only.

Commit fdeeab4

Browse files
authored
Create dir-watcher.php
1 parent 135112b commit fdeeab4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

example/dir-watcher.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Inhere
5+
* Date: 2017/12/21 0021
6+
* Time: 21:40
7+
*/
8+
9+
require dirname(__DIR__) . '/test/boot.php';
10+
11+
$mw = new \MyLib\FileUtil\ModifyWatcher();
12+
$ret = $mw
13+
// ->setIdFile(__DIR__ . '/tmp/dir.id')
14+
->watch(dirname(__DIR__))
15+
->isChanged();
16+
17+
// d41d8cd98f00b204e9800998ecf8427e
18+
// current file: ae4464472e898ba0bba8dc7302b157c0
19+
var_dump($ret, $mw->getDirMd5(), $mw->getFileCounter());

0 commit comments

Comments
 (0)