<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.filesystem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.rmdir.php',
    1 => 'rmdir',
    2 => 'Efface un dossier',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Fonctions sur les syst&egrave;mes de fichiers',
  ),
  'prev' => 
  array (
    0 => 'function.rewind.php',
    1 => 'rewind',
  ),
  'next' => 
  array (
    0 => 'function.set-file-buffer.php',
    1 => 'set_file_buffer',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/filesystem/functions/rmdir.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.rmdir" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">rmdir</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">rmdir</span> &mdash; <span class="dc-title">Efface un dossier</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.rmdir-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>rmdir</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$directory</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span></span> <code class="parameter">$context</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Tente d&#039;effacer le dossier dont le chemin est
   <code class="parameter">directory</code>. Le dossier doit être vide,
   et le script doit avoir les autorisations adéquates.
   Une alerte de niveau <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> est générée
   en cas d&#039;échec.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.rmdir-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">directory</code></dt>
     <dd>
      <p class="para">
       Le chemin vers le dossier.
      </p>
     </dd>
    
    
     <dt><code class="parameter">context</code></dt>
     <dd>
      <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">
 Une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> de <a href="stream.contexts.php" class="link">contexte de flux</a>.
</span></p></blockquote>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.rmdir-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Cette fonction retourne <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en cas de succès ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.rmdir-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>rmdir()</strong></span></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: #007700">if (!</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #DD0000">'examples'</span><span style="color: #007700">)) {<br />    </span><span style="color: #0000BB">mkdir</span><span style="color: #007700">(</span><span style="color: #DD0000">'examples'</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #0000BB">rmdir</span><span style="color: #007700">(</span><span style="color: #DD0000">'examples'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.rmdir-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.is-dir.php" class="function" rel="rdfs-seeAlso">is_dir()</a> - Indique si le fichier est un dossier</span></li>
    <li><span class="function"><a href="function.mkdir.php" class="function" rel="rdfs-seeAlso">mkdir()</a> - Cr&eacute;e un dossier</span></li>
    <li><span class="function"><a href="function.unlink.php" class="function" rel="rdfs-seeAlso">unlink()</a> - Supprime un fichier</span></li>
   </ul>
  </p>
 </div>


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