<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.inotify.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.inotify-add-watch.php',
    1 => 'inotify_add_watch',
    2 => 'Add a watch to an initialized inotify instance',
  ),
  'up' => 
  array (
    0 => 'ref.inotify.php',
    1 => 'Функції Inotify',
  ),
  'prev' => 
  array (
    0 => 'ref.inotify.php',
    1 => 'Функції Inotify',
  ),
  'next' => 
  array (
    0 => 'function.inotify-init.php',
    1 => 'inotify_init',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/inotify/functions/inotify-add-watch.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.inotify-add-watch" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">inotify_add_watch</h1>
  <p class="verinfo">(PECL inotify &gt;= 0.1.2)</p><p class="refpurpose"><span class="refname">inotify_add_watch</span> &mdash; <span class="dc-title">Add a watch to an initialized inotify instance</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.inotify-add-watch-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>inotify_add_watch</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$inotify_instance</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$pathname</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mask</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>inotify_add_watch()</strong></span> adds a new watch or modify an
   existing watch for the file or directory specified in
   <code class="parameter">pathname</code>.
  </p>
  <p class="para">
   Using <span class="function"><strong>inotify_add_watch()</strong></span> on a watched object replaces
   the existing watch. Using the <strong><code><a href="inotify.constants.php#constant.in-mask-add">IN_MASK_ADD</a></code></strong> constant
   adds (OR) events to the existing watch.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.inotify-add-watch-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">inotify_instance</code></dt>
     <dd>
      <p class="para">
       Ресурс, що повертається функцією
<span class="function"><a href="function.inotify-init.php" class="function">inotify_init()</a></span>
      </p>
     </dd>
    
    
     <dt><code class="parameter">pathname</code></dt>
     <dd>
      <p class="para">
       File or directory to watch
      </p>
     </dd>
    
    
     <dt><code class="parameter">mask</code></dt>
     <dd>
      <p class="para">
       Events to watch for. See <a href="inotify.constants.php" class="link">Попередньо визначені константи</a>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.inotify-add-watch-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   The return value is a unique (inotify instance wide) watch descriptor,
    або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.inotify-add-watch-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.inotify-init.php" class="function" rel="rdfs-seeAlso">inotify_init()</a> - Initialize an inotify instance</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>