Name

VixVM_GetFileInfoInGuest

Description

VixHandle
VixVM_GetFileInfoInGuest(VixHandle vmHandle,
                         const char *pathname,
                         VixEventProc *callbackProc,
                         void *clientData);

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

Parameters

vmHandle
Identifies a virtual machine. Call VixVM_Open() to create a virtual machine handle.
pathname
The path name of the file in the guest.
callbackProc
A callback function that will be invoked when the operation is complete.
clientData
A parameter that will be passed to the callbackProc function.

Return Value

VixHandle. A job handle that describes the state of this asynchronous operation.

Remarks

Side Effects

None.

Requirements

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

Example

int fileFlags;
int64 fileSize;
   
job = VixVM_GetFileInfoInGuest(vm, guestFile, NULL, NULL);
err = VixJob_Wait(job, VIX_PROPERTY_NONE);
if (VIX_OK != err) {
   fprintf(stderr, "failed to get file info for '%s' in vm '%s'(%"FMT64"d %s)\n",
           guestFile, vmpath, err, Vix_GetErrorText(err, NULL));
   goto abort;
}

err = Vix_GetProperties(job,
                        VIX_PROPERTY_JOB_RESULT_FILE_FLAGS,
                        &fileFlags,
                        VIX_PROPERTY_JOB_RESULT_FILE_SIZE,
                        &fileSize,
                        VIX_PROPERTY_NONE);
                                 
Vix_ReleaseHandle(job);

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