Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
Stdio
Stdio.File

Method Stdio.File()->notify()


Method notify

void notify(void|int notification, function(void:void) callback)

Description

Receive notification when change occur within the fd. To use, create a Stdio.File object of a directory like Stdio.File(".") and then call notify() with the appropriate parameters.

Note

When a program registers for some notification, only the first notification will be received unless DN_MULTISHOT is specified as part of the notification argument.

Note

At present, this function is Linux-specific and requires a kernel which supports the F_NOTIFY fcntl() call.

Parameter notification

What to notify the callback of. See the Stdio.DN_* constants for more information about possible notifications.

Parameter callback

Function which should be called when notification is received. The function gets the signal used to indicate the notification as its argument and shouldn't return anyting.