Package com.antimatterstudios.esftp.directory

Examples of com.antimatterstudios.esftp.directory.FileList


   
    for(int a=0;a<res.length;a++){
      if (res[a] instanceof IResource) {
        IResource r = (IResource)res[a];

        FileList fl = findProject(r, transferType);
        if(fl == null) return false;
       
        String str = r.getLocation().toPortableString();
       
        switch(r.getType()){
          case IResource.FILE:
            fl.addFile(str);
          break;

          case IResource.FOLDER:
          case IResource.PROJECT:
            fl.addFolder((IContainer)r);
          break;
          //SftpPlugin.consolePrintln(str,1);
        }        
      }
    }
View Full Code Here


  private void sendList(){
    //  loop through all the FileList objects,
    //  removing them one by one, optimising
    //  them and sending them to SftpPlugin to transfer
    while(m_fileList.size() > 0){
      FileList fl = (FileList)m_fileList.remove(0);
      Activator.getDefault().add(fl);
    }
  }
View Full Code Here

 
  private FileList findProject(IResource r, int transferType){
    //System.out.println("Base::findProject()");
   
    IProject p = r.getProject();
    FileList fl = null;
   
    //  project is null? return null, most probable reason is that resource is a workbench
    if(p == null) return null;
   
    //  loop through the projects you got, look for a match
    for(int a=0;a<m_fileList.size();a++){
      fl = (FileList)m_fileList.get(a);
      if(p == fl.getProject()){
        //System.out.println("Base::findProject(), found FileList, returning it");
        //  found one, return it
        return fl;
      }
    }
   
    //System.out.println("Base::findProject(), couldnt find FileList, create a new one");
    //  didnt find one, create a new one, add it, return it
    fl = new FileList(p);
    fl.init(transferType);
    //System.out.println("Base::findProject(), FileList initialised ok");
    m_fileList.add(fl);
     
    return fl;
  }
View Full Code Here

TOP

Related Classes of com.antimatterstudios.esftp.directory.FileList

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.