func (d Disk) GetUsage(path string) (*DiskUsage, error) {
	free := uint64(0)
	total := uint64(0)

	winPath, err := windows.UTF16PtrFromString(path)
	if err != nil {
		return nil, err
	}

	ret, _, err := d.procGetDiskFreeSpaceExW.Call(
		uintptr(unsafe.Pointer(winPath)),
		uintptr(unsafe.Pointer(&free)),
		uintptr(unsafe.Pointer(&total)),
		uintptr(unsafe.Pointer(nil)),
	)

	if ret == 0 {
		return nil, err
	}

	return &DiskUsage{
		Total:     total,
		Available: free,
	}, nil
}
// GetUsage gets the disk usage
GetUsage gets the disk usage
// GetUsage gets the disk usage
func (d Disk) GetUsage(path string) (*DiskUsage, error) {
	free := uint64(0)
	total := uint64(0)
	winPath, err := windows.UTF16PtrFromString(path)
	if err != nil {
		return nil, err
	}
	ret, _, err := d.procGetDiskFreeSpaceExW.Call(
		uintptr(unsafe.Pointer(winPath)),
		uintptr(unsafe.Pointer(&free)),
		uintptr(unsafe.Pointer(&total)),
		uintptr(unsafe.Pointer(nil)),
	)
	if ret == 0 {
		return nil, err
	}
	return &DiskUsage{
		Total:     total,
		Available: free,
	}, nil
}
func ( d Disk ) GetUsage ( path string ) ( * DiskUsage , error ) { free := uint64 ( 0 ) total := uint64 ( 0 ) winPath , err := windows . UTF16PtrFromString ( path ) if err != nil { return nil , err } ret , _ , err := d . procGetDiskFreeSpaceExW . Call ( uintptr ( unsafe . Pointer ( winPath ) ) , uintptr ( unsafe . Pointer ( & free ) ) , uintptr ( unsafe . Pointer ( & total ) ) , uintptr ( unsafe . Pointer ( nil ) ) , ) if ret == 0 { return nil , err } return & DiskUsage { Total : total , Available : free , } , nil }
GetUsage gets the disk usage
GetUsage gets the disk usage