Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  This library is distributed in the hope that it will be useful, but WITHOUT
  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  *  License for more details.
  *
  * IVFSExplorer.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

The VFSExplorer interface unifies access to different file system types. This includes local file systems as well remote file systems like S3. For a list of supported types see VFSType. An instance of this is returned by IAppliance.createVFSExplorer(java.lang.String). Interface ID: {003D7F92-D38E-487F-B790-8C5E8631CB2F}
 
 public class IVFSExplorer extends IUnknown {
 
     public IVFSExplorer(String wrappedVboxPortType port) {
           super(wrappedport);
     }
Returns the current path in the virtual file system.

Returns:
String
 
     public String getPath() {
       try {
          String retVal = .ivfsExplorerGetPath();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Returns the file system type which is currently in use.

Returns:
org.virtualbox_4_2.VFSType
 
     public org.virtualbox_4_2.VFSType getType() {
       try {
          org.virtualbox_4_2.jaxws.VFSType retVal = .ivfsExplorerGetType();
          return org.virtualbox_4_2.VFSType.fromValue(retVal.value());
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
     public static IVFSExplorer queryInterface(IUnknown obj) {
        return obj == null ?  null : new IVFSExplorer(obj.getWrapped(), obj.getRemoteWSPort());
     }
Updates the internal list of files/directories from the current directory level. Use entryList(org.virtualbox_4_2.Holder,org.virtualbox_4_2.Holder,org.virtualbox_4_2.Holder,org.virtualbox_4_2.Holder) to get the full list after a call to this method.

Returns:
Progress object to track the operation completion.
 
     public org.virtualbox_4_2.IProgress update() {
       try {
         String     retVal;
         retVal = .ivfsExplorerUpdate();
         return (retVal.length() > 0) ? new org.virtualbox_4_2.IProgress(retVal) : null;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
Change the current directory level.

Parameters:
aDir The name of the directory to go in.
Returns:
Progress object to track the operation completion.
 
    public org.virtualbox_4_2.IProgress cd(String aDir) {
      try {
        String     retVal;
        retVal = .ivfsExplorerCd(aDir);
        return (retVal.length() > 0) ? new org.virtualbox_4_2.IProgress(retVal) : null;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Go one directory upwards from the current directory level.

Returns:
Progress object to track the operation completion.
    public org.virtualbox_4_2.IProgress cdUp() {
      try {
        String     retVal;
        retVal = .ivfsExplorerCdUp();
        return (retVal.length() > 0) ? new org.virtualbox_4_2.IProgress(retVal) : null;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Returns a list of files/directories after a call to update(). The user is responsible for keeping this internal list up do date.

Parameters:
aNames The list of names for the entries.
aTypes The list of types for the entries.
aSizes The list of sizes (in bytes) for the entries.
aModes The list of file modes (in octal form) for the entries.
    public void entryList(Holder<List<String>> aNamesHolder<List<Long>> aTypesHolder<List<Long>> aSizesHolder<List<Long>> aModes) {
      try {
        javax.xml.ws.Holder<List<String>>   tmp_aNames = new  javax.xml.ws.Holder<List<String>>();
        javax.xml.ws.Holder<List<Long>>   tmp_aTypes = new  javax.xml.ws.Holder<List<Long>>();
        javax.xml.ws.Holder<List<Long>>   tmp_aSizes = new  javax.xml.ws.Holder<List<Long>>();
        javax.xml.ws.Holder<List<Long>>   tmp_aModes = new  javax.xml.ws.Holder<List<Long>>();
        .ivfsExplorerEntryList(tmp_aNamestmp_aTypestmp_aSizestmp_aModes);
        aNames.value = tmp_aNames.value;
        aTypes.value = tmp_aTypes.value;
        aSizes.value = tmp_aSizes.value;
        aModes.value = tmp_aModes.value;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Checks if the given file list exists in the current directory level.

Parameters:
aNames The names to check.
Returns:
The names which exist.
    public List<Stringexists(List<StringaNames) {
      try {
        List<String>     retVal;
        retVal = .ivfsExplorerExists(aNames);
        return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Deletes the given files in the current directory level.

Parameters:
aNames The names to remove.
Returns:
Progress object to track the operation completion.
    public org.virtualbox_4_2.IProgress remove(List<StringaNames) {
      try {
        String     retVal;
        retVal = .ivfsExplorerRemove(aNames);
        return (retVal.length() > 0) ? new org.virtualbox_4_2.IProgress(retVal) : null;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
New to GrepCode? Check out our FAQ X