code: public File getDirectory(String targetProject, String targetPackage)
        throws ShellException {
      // targetProject is interpreted as a directory that must exist
      //
      // targetPackage is interpreted as a sub directory, but in package
      // format (with dots instead of slashes). The sub directory will be
      // created
      // if it does not already exist
  
      File project = new File(targetProject);
      if (!project.isDirectory()) {
        throw new ShellException(getString("Warning.9", //$NON-NLS-1$
            targetProject));
      }
  
      StringBuilder sb = new StringBuilder();
      StringTokenizer st = new StringTokenizer(targetPackage, "."); //$NON-NLS-1$
      while (st.hasMoreTokens()) {
        sb.append(st.nextToken());
        sb.append(File.separatorChar);
      }
  
      File directory = new File(project, sb.toString());
      if (!directory.isDirectory()) {
        boolean rc = directory.mkdirs();
        if (!rc) {
          throw new ShellException(getString("Warning.10", //$NON-NLS-1$
              directory.getAbsolutePath()));
        }
      }
  
      return directory;
    }
docs: 从DefaultShellCallback中借用的解析文件夹的函数
  
  @param targetProject target project
  @param targetPackage target package
  @return file instance
  @throws ShellException Cannot get infos form environment