PHP Класс App\Libraries\WatchRecord\InotifyWatchRecord

Наследование: extends WatchRecord, implements App\Libraries\WatchRecord\WatchRecordInterface
Показать файл Открыть проект

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

Метод Описание
__construct ( $string ) InotifyWatchRecord constructor.
isDeleted ( ) : boolean Determine if the object has just been deleted or moved from our watched directory.
isDirectory ( )
isNewOrModified ( ) : boolean Determine if the object has just been created or modified.
parse ( $string ) Parse the inotifywait's output. The inotifywait command should be something like: $ inotifywait -rme move,close_write,delete --format "%e %w%f" $MEDIA_PATH.

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

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

public __construct ( $string )
$string

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

Determine if the object has just been deleted or moved from our watched directory.
public isDeleted ( ) : boolean
Результат boolean

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

public isDirectory ( )

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

For our purpose, we watch both the CREATE and the CLOSE_WRITE event, because some operating systems only support CREATE, but not CLOSE_WRITE and MOVED_TO. Additionally, a MOVED_TO (occurred after the object has been moved/renamed to another location **under our watched directory**) should be considered as "modified" also.
public isNewOrModified ( ) : boolean
Результат boolean

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

Parse the inotifywait's output. The inotifywait command should be something like: $ inotifywait -rme move,close_write,delete --format "%e %w%f" $MEDIA_PATH.
public parse ( $string )
$string string The output string.