<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'filesystemiterator.current.php',
    1 => 'FilesystemIterator::current',
    2 => 'Lee el fichero actual',
  ),
  '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' => 'es',
    '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">Lee el fichero actual</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-filesystemiterator.current-description">
  <h3 class="title">Descripción</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">
   Lee las informaciones sobre el fichero actual.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-filesystemiterator.current-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">Esta función no contiene ningún parámetro.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-filesystemiterator.current-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   El nombre del fichero, las informaciones del fichero, o bien
   <code class="literal">$this</code>, en función de las opciones utilizadas.
   Véase la <a href="class.filesystemiterator.php#filesystemiterator.constants" class="link">lista de constantes <span class="classname"><a href="class.filesystemiterator.php" class="classname">FilesystemIterator</a></span></a>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-filesystemiterator.current-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo con <span class="methodname"><strong>FilesystemIterator::current()</strong></span></strong></p>
    <div class="example-contents"><p>
     Este ejemplo va a probar la lista de ficheros en el script
     actual.
    </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>Resultado del ejemplo anterior en PHP 8.2 es similar a:</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">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li>Las <a href="class.filesystemiterator.php#filesystemiterator.constants" class="link">constantes FilesystemIterator</a></li>
    <li><span class="methodname"><a href="directoryiterator.current.php" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::current()</a> - Devuelve el elemento actual del DirectoryIterator</span></li>
    <li><span class="methodname"><a href="directoryiterator.getfilename.php" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::getFileName()</a> - Devuelve el nombre del fichero del elemento actual DirectoryIterator</span></li>
   </ul>
  </p>
 </div>


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