Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

disk_free_space

Description

The disk_free_space of Filesystem for PHP returns available space on filesystem or disk partition.

Syntax

disk_free_space(string $directory): float|false

Parameters

directory

A directory of the filesystem or disk partition.

Note: Given a file name instead of a directory, the behaviour of the function is unspecified and may differ between operating systems and PHP versions.

Return

Returns the number of available bytes as a float or false on failure.

Examples

1

<?

$directory = "/";

$return = disk_free_space($directory);

echo $return;

?>
255256010752

2 · windows

<?

$directory = "C:";

$return = disk_free_space($directory);

echo $return;

?>
255256010752
HomeMenu