Inotify.addWatch

Manipulates the "watch list" associated with an inotify instance. Each item ("watch") in the watch list specifies the pathname of a file or directory, along with some set of events that the kernel should monitor for the file referred to by that pathname. Either creates a new watch item, or modifies an existing watch. Each watch has a unique "watch descriptor", which is returned by this function.

class Inotify
uint
addWatch
(
char[] path
,
uint events
)

Parameters

path char[]

File path to watch (directories are also supported)

events uint

Inotify events that will be watched (bit mask)

return: Unique "watch descriptor"

Throws

upon failure to add the "watch descriptor"

Meta