Name

GetFileInfoInGuest

Description

HRESULT
GetFileInfoInGuest([in] BSTR pathName,
                   [in] ICallback* jobDoneCallback,
                   [out,retval] IJob** getFileInfoJob);

This function returns information about a file in the guest operating system.

Parameters

pathname
The path name of the file in the guest.
jobDoneCallback
An ICallback instance that will be called when the operation is complete.
getFileInfoJob
Returns an IJob object that describes the state of this asynchronous operation.

Return Value

HRESULT

Remarks

Side Effects

None.

Requirements

VixCOM.h, since VMware Workstation 6.5
Minimum Supported Guest OS: Microsoft Windows NT Series, Linux

Example


VBScript:
pathName = "C:\hello.txt"

Set job = vm.GetFileInfoInGuest(pathName, Nothing)
err = job.Wait(Array(VixCOM.Constants.VIX_PROPERTY_JOB_RESULT_FILE_SIZE), results)
If lib.ErrorIndicatesFailure(err) Then
   WScript.Echo "Error: " & lib.GetErrorText(err, empty)
   WScript.Quit
End If

WScript.Echo pathName & " is " & CStr(results(0)) & " bytes large."

Set results = Nothing
Set job = Nothing

Copyright (C) 2007-2010 VMware, Inc. All rights reserved.