public void storeRecursive(File file) throws IOException {
  if (file.isDirectory()) {
    makeDirectory(file.getName());
    changeWorkingDirectory(file.getName());
    for (    File f : file.listFiles()) {
      storeRecursive(f);
    }
    changeWorkingDirectory("..");
  }
 else {
    InputStream in=new FileInputStream(file);
    store(file.getName(),in);
  }
}

public void storeRecursive ( File file ) throws IOException { if ( file . isDirectory ( ) ) { makeDirectory ( file . getName ( ) ) ; changeWorkingDirectory ( file . getName ( ) ) ; for ( File f : file . listFiles ( ) ) { storeRecursive ( f ) ; } changeWorkingDirectory ( ".." ) ; } else { InputStream in = new FileInputStream ( file ) ; store ( file . getName ( ) , in ) ; } }
copy a local file or directory to the ftp server , recursively .
