|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-05-24 16:22 UTC] tayloj1 at uk dot ibm dot com
Description: ------------ Linux behaviour of disk_free_space() is not fully documented ref: http://uk.php.net/manual/en/function.disk-free-space.php The description in the PHP manual states: "float disk_free_space ( string $directory ) Given a string containing a directory, this function will return the number of bytes available on the corresponding filesystem or disk partition. " This is true for Windows, where only a directory name is accepted as input. On a Linux system, the function will also accept an existing filename. Please add following text to the description: "On a Linux system, the function will also accept an existing filename, in which case it will return the number of bytes remaining in the corresponding filesystem. " Example: <?php // On Linux : disk_free_space("/phpwork/tmp.txt") ; // returns bytes free in filesystem containing tmp.txt ?> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 12:00:02 2025 UTC |
Changing this back to a documentation problem. Here's the suggested patch: Index: en/reference/filesystem/functions/disk-free-space.xml =================================================================== RCS file: /repository/phpdoc/en/reference/filesystem/functions/disk-free-space.xml,v retrieving revision 1.7 diff -u -r1.7 disk-free-space.xml --- en/reference/filesystem/functions/disk-free-space.xml 20 Jun 2007 22:24:27 -0000 1.7 +++ en/reference/filesystem/functions/disk-free-space.xml 21 Jun 2007 16:57:49 -0000 @@ -17,6 +17,10 @@ number of bytes available on the corresponding filesystem or disk partition. </para> + <para> + Given a file name instead of a directory, the behaviour of the function + is unspecified and may differ between operating systems and PHP versions. + </para> </refsect1> <refsect1 role="parameters">