<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.eio.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.eio-mknod.php',
    1 => 'eio_mknod',
    2 => 'Create a special or ordinary file',
  ),
  'up' => 
  array (
    0 => 'ref.eio.php',
    1 => 'Eio Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.eio-mkdir.php',
    1 => 'eio_mkdir',
  ),
  'next' => 
  array (
    0 => 'function.eio-nop.php',
    1 => 'eio_nop',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/eio/functions/eio-mknod.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.eio-mknod" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">eio_mknod</h1>
  <p class="verinfo">(PECL eio &gt;= 0.0.1dev)</p><p class="refpurpose"><span class="refname">eio_mknod</span> &mdash; <span class="dc-title">Create a special or ordinary file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.eio-mknod-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>eio_mknod</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$path</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$dev</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$pri</code><span class="initializer"> = EIO_PRI_DEFAULT</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code><span class="initializer"> = NULL</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$data</code><span class="initializer"> = NULL</span></span><br>): <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></div>

  <p class="simpara">
  <span class="function"><strong>eio_mknod()</strong></span> creates ordinary or special(often) file.
  </p>

  <div class="warning"><strong class="warning">Warnung</strong><p class="simpara">Diese Funktion ist bis jetzt
nicht dokumentiert. Es steht nur die Liste der Parameter zur
Verfügung.</p></div>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.eio-mknod-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">path</code></dt>
    <dd>
     <span class="simpara">
     Path for the new node(file).
     </span>
    </dd>
   
   
    <dt><code class="parameter">mode</code></dt>
    <dd>
     <span class="simpara">
      Specifies both the permissions to use and the type of node to be
      created. It should be a combination (using bitwise OR) of one of the
      file types listed below and the permissions for the new node(e.g. 0640).

      Possible file types are: <strong><code><a href="eio.constants.php#constant.eio-s-ifreg">EIO_S_IFREG</a></code></strong>(regular file),
      <strong><code><a href="eio.constants.php#constant.eio-s-ifchr">EIO_S_IFCHR</a></code></strong>(character file),
      <strong><code><a href="eio.constants.php#constant.eio-s-ifblk">EIO_S_IFBLK</a></code></strong>(block special file),
      <strong><code><a href="eio.constants.php#constant.eio-s-ififo">EIO_S_IFIFO</a></code></strong>(FIFO - named pipe) and
      <strong><code><a href="eio.constants.php#constant.eio-s-ifsock">EIO_S_IFSOCK</a></code></strong>(UNIX domain socket).

      To specify permissions <em>EIO_S_I*</em> constants could be
      used.
     </span>
    </dd>
   
   
    <dt><code class="parameter">dev</code></dt>
    <dd>
     <span class="simpara">
     If  the  file type is <strong><code><a href="eio.constants.php#constant.eio-s-ifchr">EIO_S_IFCHR</a></code></strong> or
     <strong><code><a href="eio.constants.php#constant.eio-s-ifblk">EIO_S_IFBLK</a></code></strong> then dev specifies the major and minor
     numbers of the newly created device special file. Otherwise
     <code class="parameter">dev</code> ignored. See <em>mknod(2) man page for
     details</em>.
     </span>
    </dd>
   
   
    <dt><code class="parameter">pri</code></dt>
    <dd>
    <p class="para">The request priority: <strong><code><a href="eio.constants.php#constant.eio-pri-default">EIO_PRI_DEFAULT</a></code></strong>, <strong><code><a href="eio.constants.php#constant.eio-pri-min">EIO_PRI_MIN</a></code></strong>, <strong><code><a href="eio.constants.php#constant.eio-pri-max">EIO_PRI_MAX</a></code></strong>, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
If <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> passed, <code class="parameter">pri</code> internally is set to
<strong><code><a href="eio.constants.php#constant.eio-pri-default">EIO_PRI_DEFAULT</a></code></strong>.
</p>

    </dd>
   
   
    <dt><code class="parameter">callback</code></dt>
    <dd>
     <p class="para">
Die <code class="parameter">callback</code>-Funktion wird aufgerufen, wenn die Anfrage abgeschlossen ist.
Sie muss dem folgenden Prototyp entsprechen: <div class="example-contents"><div class="phpcode"><code><span style="color: #000000">void callback(mixed $data, int $result[, resource $req]);</span></code></div></div>

<dl>

<dt><code class="parameter">data</code></dt>
<dd><p class="para">sind die benutzerdefinierten Daten, die an die Anfrage übergeben werden.</p></dd>


<dt><code class="parameter">result</code></dt>
<dd><p class="para">der anfragespezifische Ergebniswert; im Grunde der Wert, der vom entsprechenden
Systemaufruf zurückgegeben wird.</p></dd>


<dt><code class="parameter">req</code></dt>
<dd><p class="para">ist eine optionale Anfrage-Ressource, die in Funktionen wie <span class="function"><a href="function.eio-get-last-error.php" class="function">eio_get_last_error()</a></span> verwendet werden kann.</p></dd>

</dl>
</p>

    </dd>
   
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <span class="simpara">
     Arbitrary variable passed to <code class="parameter">callback</code>.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.eio-mknod-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   <span class="function"><strong>eio_mknod()</strong></span> returns request resource on success,Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.eio-mknod-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>eio_mknod()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// FIFO name<br /></span><span style="color: #0000BB">$temp_filename </span><span style="color: #007700">= </span><span style="color: #DD0000">"/tmp/eio-temp-fifo"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">/* Is called when eio_mknod() finishes */<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">my_mknod_callback</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">, </span><span style="color: #0000BB">$result</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">$s </span><span style="color: #007700">= </span><span style="color: #0000BB">stat</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$s</span><span style="color: #007700">);<br /><br />    if (</span><span style="color: #0000BB">$result </span><span style="color: #007700">== </span><span style="color: #0000BB">0</span><span style="color: #007700">) {<br />        echo </span><span style="color: #DD0000">"eio_mknod_ok"</span><span style="color: #007700">;<br />    }<br /><br />    @</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">eio_mknod</span><span style="color: #007700">(</span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">, </span><span style="color: #0000BB">EIO_S_IFIFO</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />    </span><span style="color: #0000BB">EIO_PRI_DEFAULT</span><span style="color: #007700">, </span><span style="color: #DD0000">"my_mknod_callback"</span><span style="color: #007700">, </span><span style="color: #0000BB">$temp_filename</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">eio_event_loop</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">array(26) {
  [0]=&gt;
  int(17)
  [1]=&gt;
  int(2337608)
  [2]=&gt;
  int(4096)
  [3]=&gt;
  int(1)
  [4]=&gt;
  int(1000)
  [5]=&gt;
  int(100)
  [6]=&gt;
  int(0)
  [7]=&gt;
  int(0)
  [8]=&gt;
  int(1318241261)
  [9]=&gt;
  int(1318241261)
  [10]=&gt;
  int(1318241261)
  [11]=&gt;
  int(4096)
  [12]=&gt;
  int(0)
  [&quot;dev&quot;]=&gt;
  int(17)
  [&quot;ino&quot;]=&gt;
  int(2337608)
  [&quot;mode&quot;]=&gt;
  int(4096)
  [&quot;nlink&quot;]=&gt;
  int(1)
  [&quot;uid&quot;]=&gt;
  int(1000)
  [&quot;gid&quot;]=&gt;
  int(100)
  [&quot;rdev&quot;]=&gt;
  int(0)
  [&quot;size&quot;]=&gt;
  int(0)
  [&quot;atime&quot;]=&gt;
  int(1318241261)
  [&quot;mtime&quot;]=&gt;
  int(1318241261)
  [&quot;ctime&quot;]=&gt;
  int(1318241261)
  [&quot;blksize&quot;]=&gt;
  int(4096)
  [&quot;blocks&quot;]=&gt;
  int(0)
}
eio_mknod_ok</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.eio-mknod-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.eio-open.php" class="function" rel="rdfs-seeAlso">eio_open()</a> - Opens a file</span></li>
  </ul>
 </div>


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