Package org.globus.ftp

Examples of org.globus.ftp.GridFTPClient.changeDir()


        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());
              makeExternalConfigurations(srcClient, true);

        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
View Full Code Here


    try {
      GridFTPClient gridFTPClient = new GridFTPClient("", 9393);
      gridFTPClient.authenticate(credential);
      DataSource source = new DataSourceStream(new FileInputStream(file));
      if(null != directory){
        gridFTPClient.changeDir(directory);
      }
      gridFTPClient.extendedPut(remoteFile, source, this);
    } catch (ServerException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

 
  public void downloadFile(String remoteFileName, String directory, GSSCredential credential, OutputStream out){
    try {
      GridFTPClient gridFTPClient = new GridFTPClient("", 9393);
      gridFTPClient.authenticate(credential);
      gridFTPClient.changeDir(directory);
      DataSink sink = new DataSinkStream(out);
      gridFTPClient.get(remoteFileName,  sink , this);
    } catch (ServerException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());
              makeExternalConfigurations(srcClient, true);

        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
View Full Code Here

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());
        makelistDirExternalConfigurations(srcClient, srcClient.getCurrentDir());
       
        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
View Full Code Here

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());

        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
        } catch (Throwable e) {
View Full Code Here

                  rootName.getUserName(),
                  rootName.getPassword(),
                  fileSystemOptions);

            //go to the home for the user
            client.changeDir("~");
            attr_home = client.getCurrentDir();
            log.debug("Current directory: " + attr_home);
        }
        catch (final Exception e)
        {
View Full Code Here

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());

        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
        } catch (Throwable e) {
View Full Code Here

        srcClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
        srcClient.setAuthorization(new HostAuthorization(GridFtp.HOST));
        srcClient.authenticate(gssCred);
        srcClient.setDataChannelAuthentication(DataChannelAuthentication.SELF);
        srcClient.setType(Session.TYPE_ASCII);
        srcClient.changeDir(dirURI.getPath());

        Vector<Object> fileInfo = null;
        try {
          fileInfo = srcClient.mlsd();
        } catch (Throwable e) {
View Full Code Here

        client.authenticate(null);
        client.setType(Session.TYPE_ASCII);
        client.setPassive();
        client.setLocalActive();
        client.changeDir(listdir.getPath());
        final Vector v = client.mlsd(null);
        int len = v.size();
        final ArrayList files = new ArrayList(len);
        while (! v.isEmpty()) {
            final MlsxEntry f = (MlsxEntry)v.remove(0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.