Swoole Coroutine System: statvfs

Notice: the documentation is suitable for PHP extension swoole until v4.7.1, we only support PHP extension openswoole from v4.7.1

Declaration

<?php
Swoole\Coroutine\System::statvfs(string $path): array|false

Parameters

path

The absolute path of the file system you want to get information about

Return

Returns an array when successful and false when not.

Description

Returns information about a mounted filesystem on Linux.


Example

<?php

go(function()
{
    var_dump(Swoole\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)
}