getFreeDiskSpace.php
Table of Contents
Functions
- getFreeDiskSpace() : float
- Returns the number of free bytes on the filesystem hosting a directory.
Functions
getFreeDiskSpace()
Returns the number of free bytes on the filesystem hosting a directory.
getFreeDiskSpace([string $directory = '.' ]) : float
Typed wrapper around disk_free_space(): an invalid path raises a
FileException instead of returning false. Useful as a pre-flight
guard before extracting an archive or writing large files.
Parameters
- $directory : string = '.'
-
A directory (or path) on the filesystem to inspect (default:
'.').
Tags
Return values
float —The number of available bytes.