September 2001
Intermediate to advanced
768 pages
32h 45m
English
float diskfreespace(string dir) Checks for free disk space within a directory.
Returns:
Number of bytes free; 0 on error
Description:
Given a directory, this function checks for the availability of free space on the corresponding disk. The amount of free space is returned as a number of bytes.
Warning:
3.0.11: Crashes on Windows.
3.0.12: Returns nothing but 0 on Linux.
Example:
$free_in_root = diskfreespace("/");
echo ("$free_in_root bytes available in root directory<br />");
$free_in_mnt = diskfreespace("/mnt/hd2");
echo ("$free_in_mnt bytes are mounted<br />");
|
Read now
Unlock full access