PHP Класс PHPDaemon\FS\FileWatcher

Автор: Vasily Zorin ([email protected])
Наследование: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$descriptors of inotify descriptors
$files Associative array of the files being observed
$inotify Resource returned by inotify_init()

Открытые методы

Метод Описание
__construct ( ) Constructor
addWatch ( string $path, mixed $cb, integer $flags = null ) : true Adds your subscription on object in FS
onFileChanged ( string $path ) : void Called when file $path is changed
rmWatch ( string $path, mixed $cb ) : boolean Cancels your subscription on object in FS
watch ( ) : void Check the file system, triggered by timer

Описание методов

__construct() публичный Метод

Constructor
public __construct ( )

addWatch() публичный Метод

Adds your subscription on object in FS
public addWatch ( string $path, mixed $cb, integer $flags = null ) : true
$path string Path
$cb mixed Callback
$flags integer Look inotify_add_watch()
Результат true

onFileChanged() публичный Метод

Called when file $path is changed
public onFileChanged ( string $path ) : void
$path string Path
Результат void

rmWatch() публичный Метод

Cancels your subscription on object in FS
public rmWatch ( string $path, mixed $cb ) : boolean
$path string Path
$cb mixed Callback
Результат boolean

watch() публичный Метод

Check the file system, triggered by timer
public watch ( ) : void
Результат void

Описание свойств

$descriptors публичное свойство

of inotify descriptors
public $descriptors

$files публичное свойство

Associative array of the files being observed
public $files

$inotify публичное свойство

Resource returned by inotify_init()
public $inotify