Join 4,000+ others and never miss out on new tips, tutorials, and more.
Latest version:
pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5
<?php OpenSwoole\Coroutine\System::statvfs(string $path): array|false
The absolute path of the file system you want to get information about
Returns an array when successful and false
when not.
Returns information about a mounted filesystem on Linux.
<?php
co::run(function()
{
var_dump(OpenSwoole\Coroutine\System::statvfs('/'));
});
Output:
<?php
array(11) {
["bsize"]=>
int(4096)
["frsize"]=>
int(4096)
["blocks"]=>
int(61068098)
["bfree"]=>
int(45753580)
["bavail"]=>
int(42645728)
["files"]=>
int(15523840)
["ffree"]=>
int(14909927)
["favail"]=>
int(14909927)
["fsid"]=>
int(1002377915335522995)
["flag"]=>
int(4096)
["namemax"]=>
int(255)
}