PHP disk_free_space() Function

Return the free space, in bytes, of the C: directory

Definition and Usage

The disk_free_space() function returns the free space, in bytes, of the specified filesystem or disk.

Tip: Look at the disk_total_space() to get the total size of a filesystem or disk.

Syntax

disk_free_space(directory)

Parameter Values

Parameter Description
directory Required. Specifies the filesystem or disk to check

Technical Details

Return Value: The number of free space (in bytes) on success, FALSE on failure
PHP Version: 4.1+

❮ PHP Filesystem Reference