Package com.sos.VirtualFileSystem.DataElements

Examples of com.sos.VirtualFileSystem.DataElements.SOSFileList


   * @see #dir()
   */
  public SOSFileList dir(String pathname) {
    Vector<String> strList = getFilenames(pathname);
    String[] strT = (String[]) strList.toArray(new String[strList.size()]);
    SOSFileList objFileList = new SOSFileList(strT);
    return objFileList;
  }
View Full Code Here


  @Override
  public SOSFileList dir(String pathname, int flag) {
    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::dir";

    SOSFileList fileList = new SOSFileList();
    FTPFile[] listFiles = null;
    try {
      listFiles = Client().listFiles(pathname);
    }
    catch (IOException e) {
      RaiseException(e, HostID(String.format(objMsg.getMsg(SOSVfs_E_0105), conMethodName)));
    }
    for (int i = 0; i < listFiles.length; i++) {
      if (flag > 0 && listFiles[i].isDirectory()) {
        fileList.addAll(this.dir(pathname + "/" + listFiles[i].toString(), ((flag >= 1024) ? flag : flag + 1024)));
      }
      else {
        if (flag >= 1024) {
          fileList.add(pathname + "/" + listFiles[i].toString());
        }
        else {
          fileList.add(listFiles[i].toString());
        }
      }
    }
    return fileList;
  }
View Full Code Here

  public boolean transfer() throws Exception {
    boolean rc = false;
    try { // to connect, authenticate and execute commands
      Options().CheckMandatory();
      // logger.debug(Options().toString());
      objSourceFileList = new SOSFileList(objVFS4Target);
      objSourceFileList.Options(objOptions);
      objSourceFileList.StartTransaction();
      DataSourceClient();
      DataTargetClient();
      try {
View Full Code Here

   * @see #dir()
   */
  public SOSFileList dir(String pathname) {
    Vector<String> strList = getFilenames(pathname);
    String[] strT = (String[]) strList.toArray(new String[strList.size()]);
    SOSFileList objFileList = new SOSFileList(strT);
    return objFileList;
  }
View Full Code Here

   * @see #nList( String )
   * @see #dir()
   */
  @Override
  public SOSFileList dir(String pathname, int flag) {
    SOSFileList fileList = new SOSFileList();
    FTPFile[] listFiles;
    try {
      listFiles = Client().listFiles(pathname);
    }
    catch (IOException e) {
      throw new RuntimeException("listfiles in dir returns an exception", e);
    }
    for (int i = 0; i < listFiles.length; i++) {
      if (flag > 0 && listFiles[i].isDirectory()) {
        fileList.addAll(this.dir(pathname + "/" + listFiles[i].toString(), ((flag >= 1024) ? flag : flag + 1024)));
      }
      else {
        if (flag >= 1024) {
          fileList.add(pathname + "/" + listFiles[i].toString());
        }
        else {
          fileList.add(listFiles[i].toString());
        }
      }
    }
    return fileList;
  }
View Full Code Here

   */

  public SOSFileList dir(String pathname) {
    Vector<String> strList = getFilenames(pathname);
    String[] strT = (String[]) strList.toArray(new String[strList.size()]);
    SOSFileList objFileList = new SOSFileList(strT);
    return objFileList;
  }
View Full Code Here

   * @see #dir()
   */
  @Override
  public SOSFileList dir(String pathname, int flag) {

    SOSFileList fileList = new SOSFileList();
    String[] listFiles = null;
    try {
      listFiles = this.listNames(pathname);
    }
    catch (IOException e) {
      RaiseException(e, "listfiles in dir returns an exception");
    }
    if (listFiles != null) {
      for (int i = 0; i < listFiles.length; i++) {
        if (flag > 0 && isDirectory(listFiles[i])) {
          fileList.addAll(this.dir(pathname + "/" + listFiles[i], ((flag >= 1024) ? flag : flag + 1024)));
        }
        else {
          if (flag >= 1024) {
            fileList.add(pathname + "/" + listFiles[i].toString());
          }
          else {
            fileList.add(listFiles[i].toString());
          }
        }
      }
    }
    return fileList;
View Full Code Here

   */
  @Override
  public SOSFileList dir(SOSFolderName pobjFolderName) {

    String[] strEntryNames = getFilelist("", ".*", 1, true);
    SOSFileList objFL = new SOSFileList();
    objFL.add(strEntryNames, "");
    return objFL;
  }
View Full Code Here

TOP

Related Classes of com.sos.VirtualFileSystem.DataElements.SOSFileList

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.