Package org.apache.oodt.cas.protocol

Examples of org.apache.oodt.cas.protocol.ProtocolFile


    try {
      ftp.setActive(ftp.setLocalPassive());
      Vector<FileInfo> fileList = (Vector<FileInfo>) ftp.list("*", null);
      Vector<ProtocolFile> returnList = new Vector<ProtocolFile>();
      for (FileInfo file : fileList) {
        ProtocolFile pFile = new ProtocolFile(this.pwd(), file.getName(), file.isDirectory());
        if (filter.accept(pFile)) {
          returnList.add(pFile);
        }
      }
      return returnList;
View Full Code Here


    }
  }
 
  public ProtocolFile pwd() throws ProtocolException {
      try {
          return new ProtocolFile(ftp.getCurrentDir(), true);
      } catch (Exception e) {
          throw new ProtocolException("Failed to pwd : " + e.getMessage());
      }
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public ProtocolFile pwd() throws ProtocolException {
    try {
      return new ProtocolFile(ftp.printWorkingDirectory(), true);
    } catch (Exception e) {
      throw new ProtocolException("Failed to pwd : " + e.getMessage());
    }
  }
View Full Code Here

      for (int i = 0; i < files.length; i++) {
        FTPFile file = files[i];
        if (file == null)
          continue;
        String path = this.pwd().getPath();
        returnFiles.add(new ProtocolFile(path + "/" + file.getName(), file
            .isDirectory()));
      }
      return returnFiles;
    } catch (Exception e) {
      throw new ProtocolException("Failed to get file list : " + e.getMessage());
View Full Code Here

      for (int i = 0; i < files.length; i++) {
        FTPFile file = files[i];
        if (file == null)
          continue;
        String path = this.pwd().getPath();
        ProtocolFile pFile = new ProtocolFile(path + "/" + file.getName(), file
            .isDirectory());
        if (filter.accept(pFile)) {
          returnFiles.add(pFile);
        }
      }
View Full Code Here

          + e.getMessage());
    }
  }

  public void cdRoot() throws ProtocolException {
    cd(new ProtocolFile(ProtocolFile.SEPARATOR, true));
  }
View Full Code Here

  public void cdRoot() throws ProtocolException {
    cd(new ProtocolFile(ProtocolFile.SEPARATOR, true));
  }

  public void cdHome() throws ProtocolException {
    cd(new ProtocolFile(homeDir, true));
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.protocol.ProtocolFile

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.