Package com.vmware.vim.binding.vim

Examples of com.vmware.vim.binding.vim.FileManager


      final String srcDsPath = getDsPath(srcDs, srcPath);
      final String dstDsPath = getDsPath(dstDs, dstPath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.CopyFile,
               mgr.copyFile(srcDsPath, srcDs.getDatacenterMoRef(),
                            dstDsPath, dstDs.getDatacenterMoRef(), true),
               callback);
         }
      });
      return task;
View Full Code Here


         final IVcTaskCallback callback) throws Exception {
      final String dsPath = getDsPath(datastore, filePath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.DeleteFile,
                  mgr.deleteFile(dsPath, datastore.getDatacenterMoRef()), callback);
         }
      });
      return task;
   }
View Full Code Here

      final String srcDsPath = getDsPath(srcDs, srcPath);
      final String dstDsPath = getDsPath(dstDs, dstPath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.MoveFile,
                  mgr.moveFile(srcDsPath, srcDs.getDatacenterMoRef(),
                               dstDsPath, dstDs.getDatacenterMoRef(), true), callback);
         }
      });
      return task;
   }
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.vim.FileManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.