code: public void mkdirs(String dir) throws SftpStatusException, SshException {
  		StringTokenizer tokens = new StringTokenizer(dir, "/");
  		String path = dir.startsWith("/") ? "/" : "";
  
  		while (tokens.hasMoreElements()) {
  			path += (String) tokens.nextElement();
  
  			try {
  				stat(path);
  			} catch (SftpStatusException ex) {
  				try {
  					mkdir(path);
  				} catch (SftpStatusException ex2) {
  					if (ex2.getStatus() == SftpStatusException.SSH_FX_PERMISSION_DENIED)
  						throw ex2;
  				}
  			}
  
  			path += "/";
  		}
  	}
docs: <p>
  Create a directory or set of directories. This method will not fail even
  if the directories exist. It is advisable to test whether the directory
  exists before attempting an operation by using <a
  href="#stat(java.lang.String)">stat</a> to return the directories
  attributes.
  </p>
  
  @param dir
  the path of directories to create.