disk_free_space

Supported Versions: PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8
Returns available space on filesystem or disk partition
<?php disk_free_space(string $directory): float|false
<?php                         $tempFileName,

                        $m[1],

                        $m[2],

                        @disk_free_space(dirname($tempFileName))

                    );



                    $this->io->writeError($message);
<?php     private function checkDiskSpace(Config $config)

    {

        $minSpaceFree = 1024 * 1024;

        if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)

            || (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)

        ) {

            return '<error>The disk hosting '.$dir.' is full</error>';
<?php     {

        $minSpaceFree = 1024 * 1024;

        if ((($df = @disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)

            || (($df = @disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)

        ) {

            return '<error>The disk hosting '.$dir.' is full</error>';

        }
<?php                 $config = $composer->getConfig();



                $minSpaceFree = 1024 * 1024;

                if ((($df = disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree)

                ) {
<?php                 $minSpaceFree = 1024 * 1024;

                if ((($df = disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree)

                ) {

                    $io->writeError('<error>The disk hosting '.$dir.' is full, this may be the cause of the following exception</error>', true, IOInterface::QUIET);
<?php                 $minSpaceFree = 1024 * 1024;

                if ((($df = disk_free_space($dir = $config->get('home'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = $config->get('vendor-dir'))) !== false && $df < $minSpaceFree)

                    || (($df = disk_free_space($dir = sys_get_temp_dir())) !== false && $df < $minSpaceFree)

                ) {

                    $io->writeError('<error>The disk hosting '.$dir.' is full, this may be the cause of the following exception</error>', true, IOInterface::QUIET);

                }