PHP » PYTHON |
login |
register |
about
|
PYTHON disk_free_space
is this article helpful?
|
Python replacement for PHP's disk_free_space
[
edit
| history
]
import os temp = os.statvfs(directory) result = temp.f_bavail * temp.f_bsize disk_free_space(PHP 4 >= 4.1.0, PHP 5) disk_free_space — Returns available space in directory Description
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. Parameters
Return ValuesReturns the number of available bytes as a float. Examples
Example #1 disk_free_space() example
<?php
Notes
|
more
Recently updated
more
Most requested
more
Last requests
|