<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.filesystemiterator.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'filesystemiterator.current.php',
    1 => 'FilesystemIterator::current',
    2 => 'The current file',
  ),
  'up' => 
  array (
    0 => 'class.filesystemiterator.php',
    1 => 'FilesystemIterator',
  ),
  'prev' => 
  array (
    0 => 'filesystemiterator.construct.php',
    1 => 'FilesystemIterator::__construct',
  ),
  'next' => 
  array (
    0 => 'filesystemiterator.getflags.php',
    1 => 'FilesystemIterator::getFlags',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/spl/filesystemiterator/current.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="filesystemiterator.current" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">FilesystemIterator::current</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">FilesystemIterator::current</span> &mdash; <span class="dc-title">The current file</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-filesystemiterator.current-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>FilesystemIterator::current</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="class.splfileinfo.php" class="type SplFileInfo">SplFileInfo</a></span>|<span class="type"><a href="class.filesystemiterator.php" class="type FilesystemIterator">FilesystemIterator</a></span></span></div>

  <p class="para rdfs-comment">
   Get file information of the current element.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-filesystemiterator.current-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">Diese Funktion besitzt keine Parameter.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-filesystemiterator.current-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   The filename, file information, or $this depending on the set flags.
   See the <a href="class.filesystemiterator.php#filesystemiterator.constants" class="link">FilesystemIterator constants</a>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-filesystemiterator.current-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="methodname"><strong>FilesystemIterator::current()</strong></span> example</strong></p>
    <div class="example-contents"><p>
     This example will list the contents of the directory containing the script.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$iterator </span><span style="color: #007700">= new </span><span style="color: #0000BB">FilesystemIterator</span><span style="color: #007700">(</span><span style="color: #0000BB">__DIR__</span><span style="color: #007700">, </span><span style="color: #0000BB">FilesystemIterator</span><span style="color: #007700">::</span><span style="color: #0000BB">CURRENT_AS_PATHNAME</span><span style="color: #007700">);<br />foreach (</span><span style="color: #0000BB">$iterator </span><span style="color: #007700">as </span><span style="color: #0000BB">$fileinfo</span><span style="color: #007700">) {<br />    echo </span><span style="color: #0000BB">$iterator</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">current</span><span style="color: #007700">() . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt mit PHP 8.2 eine ähnliche Ausgabe wie:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">/www/examples/.
/www/examples/..
/www/examples/apple.jpg
/www/examples/banana.jpg
/www/examples/example.php</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-filesystemiterator.current-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><a href="class.filesystemiterator.php#filesystemiterator.constants" class="link">FilesystemIterator constants</a></li>
    <li><span class="methodname"><a href="directoryiterator.current.php" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::current()</a> - Return the current DirectoryIterator item</span></li>
    <li><span class="methodname"><a href="directoryiterator.getfilename.php" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::getFileName()</a> - Return file name of current DirectoryIterator item</span></li>
   </ul>
  </p>
 </div>


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