= 0.1.2)inotify_read — Read events from an inotify instance說(shuō)明inotify_read(resource $inotify_instance): arrayRead inotify ev">

inotify_read

(PECL inotify >= 0.1.2)

inotify_readRead events from an inotify instance

說(shuō)明

inotify_read(resource $inotify_instance): array

Read inotify events from an inotify instance.

參數(shù)

inotify_instance

inotify_init()返回的資源

返回值

An array of inotify events or false if no events was pending and inotify_instance is non-blocking. Each event is an array with the following keys:

  • wd is a watch descriptor returned by inotify_add_watch()
  • mask is a bit mask of events
  • cookie is a unique id to connect related events (e.g. IN_MOVE_FROM and IN_MOVE_TO)
  • name is the name of a file (e.g. if a file was modified in a watched directory)

參見(jiàn)

  • inotify_init() - Initialize an inotify instance
  • stream_select() - Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by seconds and microseconds
  • stream_set_blocking() - 為資源流設(shè)置阻塞或者阻塞模式
  • inotify_queue_len() - Return a number upper than zero if there are pending events