XXXVII. File Alteration Monitor Functions

Въведение

FAM monitors files and directories, notifying interested applications of changes. More information about FAM is available at http://oss.sgi.com/projects/fam/.

A PHP script may specify a list of files for FAM to monitor using the functions provided by this extension.

The FAM process is started when the first connection from any application to it is opened. It exits after all connections to it have been closed.

Забележка: Това разширение беше преместено в PECL хранилището и вече не е част от пакета на PHP от PHP 5.1.0.

Забележка: Това разширение не е налично на Windows платформи.

Изисквания

This extension uses the functions of the FAM library, developed by SGI. Therefore you have to download and install the FAM library.

Инсталация

To use PHP's FAM support you must compile PHP --with-fam[=DIR] where DIR is the location of the directory containing the lib and include directories.

Конфигурация по време на работа

Това разширение няма дефинирани конфигурационни директиви в php.ini.

Ресурсни типове

There are two resource types used in the FAM module. The first one is the connection to the FAM service returned by fam_open(), the second a monitoring resource returned by the fam_monitor_XXX functions.

Предефинирани константи

Константите по-долу са дефинирани в това разширение и ще бъдат налични единствено, когато това разширение е компилирано в PHP или динамично пуснато по време на изпълнение.

Таблица 1. FAM event constants

Съдържание
fam_cancel_monitor -- Terminate monitoring
fam_close -- Close FAM connection
fam_monitor_collection -- Monitor a collection of files in a directory for changes
fam_monitor_directory -- Monitor a directory for changes
fam_monitor_file -- Monitor a regular file for changes
fam_next_event -- Get next pending FAM event
fam_open -- Open connection to FAM daemon
fam_pending -- Check for pending FAM events
fam_resume_monitor -- Resume suspended monitoring
fam_suspend_monitor -- Temporarily suspend monitoring