PHP 클래스 PHPDaemon\FS\FileWatcher

저자: Vasily Zorin ([email protected])
상속: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
파일 보기 프로젝트 열기: kakserpom/phpdaemon

공개 프로퍼티들

프로퍼티 타입 설명
$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