<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.disk-total-space.php',
    1 => 'disk_total_space',
    2 => 'Returns the total size of a filesystem or disk partition',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Filesystem Functions',
  ),
  'prev' => 
  array (
    0 => 'function.disk-free-space.php',
    1 => 'disk_free_space',
  ),
  'next' => 
  array (
    0 => 'function.diskfreespace.php',
    1 => 'diskfreespace',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/filesystem/functions/disk-total-space.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.disk-total-space" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">disk_total_space</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">disk_total_space</span> &mdash; <span class="dc-title">Returns the total size of a filesystem or disk partition</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.disk-total-space-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>disk_total_space</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="type"><span class="type"><a href="language.types.float.php" class="type float">float</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Given a string containing a directory, this function will return the total
   number of bytes on the corresponding filesystem or disk partition.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.disk-total-space-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">directory</code></dt>
     <dd>
      <p class="para">
       A directory of the filesystem or disk partition.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.disk-total-space-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the total number of bytes as a float
    or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.disk-total-space-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>disk_total_space()</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">// $ds contains the total number of bytes available on "/"<br /></span><span style="color: #0000BB">$ds </span><span style="color: #007700">= </span><span style="color: #0000BB">disk_total_space</span><span style="color: #007700">(</span><span style="color: #DD0000">"/"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">// On Windows:<br /></span><span style="color: #0000BB">$ds </span><span style="color: #007700">= </span><span style="color: #0000BB">disk_total_space</span><span style="color: #007700">(</span><span style="color: #DD0000">"C:"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$ds </span><span style="color: #007700">= </span><span style="color: #0000BB">disk_total_space</span><span style="color: #007700">(</span><span style="color: #DD0000">"D:"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 notes" id="refsect1-function.disk-total-space-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: <span class="simpara">This function will not work on
<a href="features.remote-files.php" class="link">remote files</a> as the file to
be examined must be accessible via the server&#039;s filesystem.</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.disk-total-space-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.disk-free-space.php" class="function" rel="rdfs-seeAlso">disk_free_space()</a> - Returns available space on filesystem or disk partition</span></li>
   </ul>
  </p>
 </div>


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