<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'filesystemiterator.current.php',
    1 => 'FilesystemIterator::current',
    2 => 'Lit le fichier courant',
  ),
  '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' => 'fr',
    '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">Lit le fichier courant</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-filesystemiterator.current-description">
  <h3 class="title">Description</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">
   Lit les informations sur le fichier courant.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-filesystemiterator.current-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">Cette fonction ne contient aucun paramètre.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-filesystemiterator.current-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Le nom du fichier, les informations du fichier, ou bien
   <code class="literal">$this</code>, en fonction des options utilisées.
   Voir la <a href="class.filesystemiterator.php#filesystemiterator.constants" class="link">liste des 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">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="methodname"><strong>FilesystemIterator::current()</strong></span></strong></p>
    <div class="example-contents"><p>
     Cet exemple va tester la liste des fichiers dans le script
     courant.
    </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>Résultat de l&#039;exemple ci-dessus en PHP 8.2 est similaire à :</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">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li>Les <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> - Retourne l'&eacute;l&eacute;ment courant du DirectoryIterator</span></li>
    <li><span class="methodname"><a href="directoryiterator.getfilename.php" class="methodname" rel="rdfs-seeAlso">DirectoryIterator::getFileName()</a> - Retourne le nom de l'entr&eacute;e courante du dossier</span></li>
   </ul>
  </p>
 </div>


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