Method System.Inotify.parse_event()
- Method parse_event
array(string|int) parse_event(stringdata)- Description
Parses one inotify_event struct from
data.- Returns
Returns an array consisting of
Array int0The watch descriptor returned by _Instance()->add_watch() when the watch for this file was added.
int1An integer that describes the event that occured. See the inotify manpage for a list of possible events and their numerical identifiers.
int2An integer cookie that can be used to group together different events that were triggered by moving a file from one location to another.
string3The name of the file. This will only be present if the event happened to a file in a directory that was watched, e.g. with System.Inotify.IN_CREATE. Otherwise this will be 0.
int4The length of the data that has been parsed. If the
datastring contains more than one inotify event, this parse function needs to be called again with the remainder as an argument.