code: public Vector list(String filter, String modifier)
          throws ServerException, ClientException, IOException {
  
          ByteArrayDataSink sink = new ByteArrayDataSink();
  
          list(filter, modifier, sink);
  
          ByteArrayOutputStream received = sink.getData();
  
          // transfer done. Data is in received stream.
          // convert it to a vector.
  
          BufferedReader reader =
              new BufferedReader(new StringReader(received.toString()));
  
          Vector fileList = new Vector();
          FileInfo fileInfo = null;
          String line = null;
  
          while ((line = reader.readLine()) != null) {
              line = line.trim();
              if (logger.isDebugEnabled()) {
                  logger.debug("line ->" + line);
              }
              if(line.equals(""))
              {
                  continue;
              }
              if (line.startsWith("total"))
                  continue;
              try {
                  fileInfo = new FileInfo(line);
              } catch (FTPException e) {
                  ClientException ce =
                      new ClientException(
                                          ClientException.UNSPECIFIED,
                                          "Could not create FileInfo");
                  ce.setRootCause(e);
                  throw ce;
              }
              fileList.addElement(fileInfo);
          }
          return fileList;
      }
docs: Performs remote directory listing with the specified filter and
  modifier. Sends 'LIST &lt;modifier&gt; &lt;filter&gt;' command.
  
  <br><b>Note</b>: <i>
  This function can only parse Unix ls -d like output. Please
  note that the LIST output is unspecified in the FTP standard and
  each server might return slightly different output causing the
  parsing to fail.
  Also, please keep in mind that the ftp server might not
  recognize or support all the different modifiers or filters.
  In fact, some servers such as GridFTP server distributed with
  GT 4.0.0 does not support any modifiers or filters
  (strict RFC 959 compliance).
  It is strongly recommended to use {@link #mlsd(String) mlsd()}
  function instead.</i>
  
  @param filter "*" for example, can be null.
  @param modifier "-d" for example, can be null.
  @return Vector list of {@link FileInfo FileInfo} objects, representing
  remote files
  @see #mlsd(String)