public function total_disk_space($path = '/')
    {
        $ds = 0;
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $disks =  $wmi->ExecQuery("Select * from Win32_LogicalDisk");

            foreach ($disks as $d) {
                if ($d->Name == $path) {
                    $ds = $d->Size;
                }
            }
        } else {
            $ds = disk_total_space($path);
        }
        return $ds;
    }
public function total_disk_space($path = '/')
    {
        $ds = 0;
        if ($this->host_os === 'WINDOWS') {
            $wmi = new \COM("winmgmts:\\\\.\\root\\cimv2");
            $disks =  $wmi->ExecQuery("Select * from Win32_LogicalDisk");

            foreach ($disks as $d) {
                if ($d->Name == $path) {
                    $ds = $d->Size;
                }
            }
        } else {
            $ds = disk_total_space($path);
        }
        return $ds;
    }
public function total_disk_space ( $ path = '/' ) { $ ds = 0 ; if ( $ this -> host_os === 'WINDOWS' ) { $ wmi = new \ COM ( "winmgmts:\\\\.\\root\\cimv2" ) ; $ disks = $ wmi -> ExecQuery ( "Select * from Win32_LogicalDisk" ) ; foreach ( $ disks as $ d ) { if ( $ d -> Name == $ path ) { $ ds = $ d -> Size ; } } } else { $ ds = disk_total_space ( $ path ) ; } return $ ds ; }
Get total diskspace

@param  string $path
@return int
Get total diskspace