Package org.apache.oodt.cas.pushpull.protocol

Examples of org.apache.oodt.cas.pushpull.protocol.ProtocolPath


  }

  @Override
  public void cdToRoot() throws ProtocolException {
      try {
          chDir(new ProtocolPath("/", true));
      } catch (Exception e) {
          throw new ProtocolException("Failed to cd to root : "
                  + e.getMessage());
      }
  }
View Full Code Here


          Vector<FileInfo> fileList = (Vector<FileInfo>) ftp.list("*", null);
          Vector<ProtocolFile> returnList = new Vector<ProtocolFile>();
          String path = this.pwd().getProtocolPath().getPathString();
          for (FileInfo file : fileList) {
              returnList.add(new ProtocolFile(this.getRemoteSite(),
                      new ProtocolPath(path + "/" + file.getName(), file
                              .isDirectory())));
          }
          return returnList;
      } catch (Exception e) {
          throw new ProtocolException("Failed to get list of files : "
View Full Code Here

      }
  }

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

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

                FTPFile file = files[i];
                if (file == null)
                    continue;
                String path = this.pwd().getURL().getPath();
                returnFiles.add(new ProtocolFile(this.getRemoteSite(),
                        new ProtocolPath(path + "/" + file.getName(), file
                                .isDirectory())));
            }
            // System.out.println("RETURN FILES: " + returnFiles);
            return returnFiles;
        } catch (Exception e) {
View Full Code Here

    }

    @Override
    public void cdToRoot() throws ProtocolException {
        try {
            chDir(new ProtocolPath("/", true));
        } catch (Exception e) {
            throw new ProtocolException("Failed to cd to root : "
                    + e.getMessage());
        }
    }
View Full Code Here

    }
  }

  public void cdToRoot() throws ProtocolException {
    try {
      chDir(new ProtocolPath("/", true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to root : " + e.getMessage());
    }
  }
View Full Code Here

          .ls(sftpChannel.pwd());
      Vector<ProtocolFile> returnFiles = new Vector<ProtocolFile>();
      for (ChannelSftp.LsEntry sftpFile : sftpFiles) {
        String path = this.pwd().getProtocolPath().getPathString();
        returnFiles.add(new ProtocolFile(this.getRemoteSite(),
            new ProtocolPath(path + "/" + sftpFile.getFilename(), sftpFile
                .getAttrs().isDir())));
      }
      return returnFiles;
    } catch (Exception e) {
      throw new ProtocolException("Failed to get file list : " + e.getMessage());
View Full Code Here

    }
  }

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

  }

  @Override
  public synchronized void cdToRoot() throws ProtocolException {
    try {
      chDir(new ProtocolPath("/", true));
    } catch (Exception e) {
      throw new ProtocolException("Failed to cd to root : " + e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.pushpull.protocol.ProtocolPath

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.