disk_total_space
(PHP 4 >= 4.0.7, PHP 5)
disk_total_space — ディレクトリの全体サイズを返す
説明
float disk_total_space
( string $directory
)
ディレクトリを含む文字列を指定してください。この関数は、 ファイルシステムまたはディスクパーティションに対応する全体バイト数を返します。
パラメータ
- directory
-
ファイルシステムのディレクトリあるいはディスクパーティション。
返り値
総バイト数を float 型で返します。
例
Example#1 disk_total_space() の例
<?php
// $df は、「/」で利用可能な全体バイト数
$df = disk_total_space("/");
// Windows の場合:
disk_total_space("C:");
disk_total_space("D:");
?>
注意
注意: この関数では、 リモートファイル を 使用することはできません。これは、処理されるファイルがサーバの ファイルシステムによりアクセスできる必要があるためです。