<!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>Predefined Constants</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="inotify.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.inotify.html">Inotify Functions</a></div> <div class="up"><a href="book.inotify.html">Inotify</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="inotify.constants" class="appendix"> <h1>Predefined Constants</h1> <p class="simpara"> The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime. </p> <dl> <strong class="title">Inotify constants usable with <span class="function"><a href="function.inotify-add-watch.html" class="function">inotify_add_watch()</a></span> and/or returned by <span class="function"><a href="function.inotify-read.html" class="function">inotify_read()</a></span></strong> <dt id="constant.in-access"> <span class="term"> <strong><code>IN_ACCESS</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File was accessed (read) (*) </span> </dd> </dt> <dt id="constant.in-modify"> <span class="term"> <strong><code>IN_MODIFY</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File was modified (*) </span> </dd> </dt> <dt id="constant.in-attrib"> <span class="term"> <strong><code>IN_ATTRIB</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Metadata changed (e.g. permissions, mtime, etc.) (*) </span> </dd> </dt> <dt id="constant.in-close-write"> <span class="term"> <strong><code>IN_CLOSE_WRITE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File opened for writing was closed (*) </span> </dd> </dt> <dt id="constant.in-close-nowrite"> <span class="term"> <strong><code>IN_CLOSE_NOWRITE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File not opened for writing was closed (*) </span> </dd> </dt> <dt id="constant.in-open"> <span class="term"> <strong><code>IN_OPEN</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File was opened (*) </span> </dd> </dt> <dt id="constant.in-moved-to"> <span class="term"> <strong><code>IN_MOVED_TO</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File moved into watched directory (*) </span> </dd> </dt> <dt id="constant.in-moved-from"> <span class="term"> <strong><code>IN_MOVED_FROM</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File moved out of watched directory (*) </span> </dd> </dt> <dt id="constant.in-create"> <span class="term"> <strong><code>IN_CREATE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File or directory created in watched directory (*) </span> </dd> </dt> <dt id="constant.in-delete"> <span class="term"> <strong><code>IN_DELETE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File or directory deleted in watched directory (*) </span> </dd> </dt> <dt id="constant.in-delete-self"> <span class="term"> <strong><code>IN_DELETE_SELF</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Watched file or directory was deleted </span> </dd> </dt> <dt id="constant.in-move-self"> <span class="term"> <strong><code>IN_MOVE_SELF</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Watch file or directory was moved </span> </dd> </dt> <dt id="constant.in-close"> <span class="term"> <strong><code>IN_CLOSE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Equals to IN_CLOSE_WRITE | IN_CLOSE_NOWRITE </span> </dd> </dt> <dt id="constant.in-move"> <span class="term"> <strong><code>IN_MOVE</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Equals to IN_MOVED_FROM | IN_MOVED_TO </span> </dd> </dt> <dt id="constant.in-all-events"> <span class="term"> <strong><code>IN_ALL_EVENTS</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Bitmask of all the above constants </span> </dd> </dt> <dt id="constant.in-unmount"> <span class="term"> <strong><code>IN_UNMOUNT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> File system containing watched object was unmounted </span> </dd> </dt> <dt id="constant.in-q-overflow"> <span class="term"> <strong><code>IN_Q_OVERFLOW</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Event queue overflowed (wd is -1 for this event) </span> </dd> </dt> <dt id="constant.in-ignored"> <span class="term"> <strong><code>IN_IGNORED</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Watch was removed (explicitly by <span class="function"><a href="function.inotify-rm-watch.html" class="function">inotify_rm_watch()</a></span> or because file was removed or filesystem unmounted </span> </dd> </dt> <dt id="constant.in-isdir"> <span class="term"> <strong><code>IN_ISDIR</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Subject of this event is a directory </span> </dd> </dt> <dt id="constant.in-onlydir"> <span class="term"> <strong><code>IN_ONLYDIR</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Only watch pathname if it is a directory (Since Linux 2.6.15) </span> </dd> </dt> <dt id="constant.in-dont-follow"> <span class="term"> <strong><code>IN_DONT_FOLLOW</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Do not dereference pathname if it is a symlink (Since Linux 2.6.15) </span> </dd> </dt> <dt id="constant.in-mask-add"> <span class="term"> <strong><code>IN_MASK_ADD</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Add events to watch mask for this pathname if it already exists (instead of replacing mask). </span> </dd> </dt> <dt id="constant.in-oneshot"> <span class="term"> <strong><code>IN_ONESHOT</code></strong> (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>) </span> <dd> <span class="simpara"> Monitor pathname for one event, then remove from watch list. </span> </dd> </dt> </dl> <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara"> The events marked with an asterisk (*) above can occur for files in watched directories. </span> </p></blockquote> </div> <hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="inotify.resources.html">Resource Types</a></div> <div class="next" style="text-align: right; float: right;"><a href="ref.inotify.html">Inotify Functions</a></div> <div class="up"><a href="book.inotify.html">Inotify</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>