disk_free_space - Returns free space in a directory
disk_free_space
(PHP 4" = 4.1.0, PHP 5)
disk_free_space - Returns free space in a directory
Description
float disk_free_space (String $directory)
Given that a string contains a directory, the function will return the number of bytes provided for the corresponding file or partition.
Parameters
Table of contents
Directory of files or partitions.
Note: Since the filename is not a directory, the behavior of the function is unknown and may differ between operating systems and PHP versions.
Return value
Return some available bytes as float.
Example
Example #1 disk_free_space() example
// $df contains the number of bytes available on "/"
$df = disk_free_space("/");
// On Windows:
disk_free_space("C:");
disk_free_space("D:");
?>