title: How to list files directory/files using Apache Common vfs
body: <p>i am new using Apache Common vfs, 
  I success connect to the server
  I already read docs but i'm stuck in this code.
  How i can list directory/files?</p>
  
  <pre><code>....
  Session session = null;
          FileSystemManager fsManager = null;
          FileSystem fs = null;
          try {
              String host = "host_here";
              int port = 22;
  
              String userStr = "user_here";
              char [] username = userStr.toCharArray();
  
              String passStr = "password_here";
              char [] password = passStr.toCharArray();
  
              session = SftpClientFactory.createConnection(host, port, username, password, null);
              //session.connect();
  
              System.out.println("Connected to the server");
  
              FileSystemOptions opts = new FileSystemOptions();
              fsManager = VFS.getManager();
              FileObject file = fsManager.resolveFile("ftp://"+userStr+":"+passStr+"@"+host+"/home/", opts);    
  
              // .... whats next i do here? .....
  
          } catch (Exception e) {
              session.disconnect();
              e.printStackTrace();
          }
  ...
  </code></pre>
  
  <p>Please help me, 
  Thank you before :)</p>