<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Read events from an inotify instance</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.inotify-queue-len.html">inotify_queue_len</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.inotify-rm-watch.html">inotify_rm_watch</a></div> <div class="up"><a href="ref.inotify.html">Inotify Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.inotify-read" class="refentry"> <div class="refnamediv"> <h1 class="refname">inotify_read</h1> <p class="verinfo">(PECL inotify >= 0.1.2)</p><p class="refpurpose"><span class="refname">inotify_read</span> — <span class="dc-title">Read events from an inotify instance</span></p> </div> <div class="refsect1 description" id="refsect1-function.inotify-read-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">array</span> <span class="methodname"><strong>inotify_read</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$inotify_instance</code></span> )</div> <p class="para rdfs-comment"> Read inotify events from an inotify instance. </p> </div> <div class="refsect1 parameters" id="refsect1-function.inotify-read-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">inotify_instance</code></em></span> <dd> <p class="para"> Resource returned by <span class="function"><a href="function.inotify-init.html" class="function">inotify_init()</a></span> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.inotify-read-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> An array of inotify events or <strong><code>FALSE</code></strong> if no events was pending and <em><code class="parameter">inotify_instance</code></em> is non-blocking. Each event is an array with the following keys: <ul class="simplelist"> <li class="member">wd is a watch descriptor returned by <span class="function"><a href="function.inotify-add-watch.html" class="function">inotify_add_watch()</a></span></li> <li class="member">mask is a bit mask of <a href="inotify.constants.html" class="link">events</a></li> <li class="member">cookie is a unique id to connect related events (e.g. <strong><code>IN_MOVE_FROM</code></strong> and <strong><code>IN_MOVE_TO</code></strong>)</li> <li class="member">name is the name of a file (e.g. if a file was modified in a watched directory)</li> </ul> </p> </div> <div class="refsect1 seealso" id="refsect1-function.inotify-read-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.inotify-init.html" class="function" rel="rdfs-seeAlso">inotify_init()</a> - Initialize an inotify instance</span></li> <li class="member"> <span class="function"><a href="function.stream-select.html" class="function" rel="rdfs-seeAlso">stream_select()</a> - Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by tv_sec and tv_usec</span></li> <li class="member"> <span class="function"><a href="function.stream-set-blocking.html" class="function" rel="rdfs-seeAlso">stream_set_blocking()</a> - Set blocking/non-blocking mode on a stream</span></li> <li class="member"> <span class="function"><a href="function.inotify-queue-len.html" class="function" rel="rdfs-seeAlso">inotify_queue_len()</a> - Return a number upper than zero if there are pending events</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.inotify-queue-len.html">inotify_queue_len</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.inotify-rm-watch.html">inotify_rm_watch</a></div> <div class="up"><a href="ref.inotify.html">Inotify Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>