Example #1
0
        /// <summary>
        /// Creates the directory in the Virtual Machine
        /// </summary>
        /// <param name=”pathName”></param>
        /// <returns></returns>
        public bool CreateDirectoryInVm(string pathName)
        {
            IJob jobHandle = m_vmHandle.CreateDirectoryInGuest(pathName, null, null);

            m_vixError = jobHandle.WaitWithoutResults();

            return(m_vixError == VixCOM.Constants.VIX_OK);
        }
Example #2
0
        public void CreateDirectory(string name)
        {
            VixCOM.IJob job = _virtualMachine.CreateDirectoryInGuest(name, null, null);
            UInt64      err = job.WaitWithoutResults();

            if (lib.ErrorIndicatesFailure(err))
            {
                short  errCode = lib.ErrorCode(err);
                string errMsg;
                errMsg = lib.GetErrorText(err, null);

                throw new Exception("CreateDirectory: " + errMsg);
            }
        }