func (g *Guest) IsDir(path string) (bool, error) {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK
	var result C.int

	cpath := C.CString(path)
	defer C.free(unsafe.Pointer(cpath))

	jobHandle = C.VixVM_DirectoryExistsInGuest(g.handle,
		cpath, // dir path name
		nil,   // callbackProc
		nil)   // clientData

	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.is_file_or_dir(jobHandle, &result)
	if C.VIX_OK != err {
		return false, &Error{
			Operation: "guest.IsDir",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	if int(result) == C.FALSE {
		return false, nil
	}

	return true, nil
}
func (g *Guest) IsDir(path string) (bool, error) {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK
	var result C.int

	cpath := C.CString(path)
	defer C.free(unsafe.Pointer(cpath))

	jobHandle = C.VixVM_DirectoryExistsInGuest(g.handle,
		cpath, // dir path name
		nil,   // callbackProc
		nil)   // clientData

	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.is_file_or_dir(jobHandle, &result)
	if C.VIX_OK != err {
		return false, &Error{
			Operation: "guest.IsDir",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	if int(result) == C.FALSE {
		return false, nil
	}

	return true, nil
}
// IsDir tests the existence of a directory in the guest operating
// system.
//
// Parameters:
//
//   path: Directory path in the guest OS to be checked.
//
// Remarks:
//
//   * Only absolute paths should be used for files in the guest; the resolution
//     of relative paths is not specified.
//
// Since VMware Workstation 6.0
// Minimum Supported Guest OS: Microsoft Windows NT Series, Linux