test_class.file: jcodes-core/src/test/java/com/czarea/jcodes/util/ShellUtilTest.java
test_class.identifier: ShellUtilTest
test_case.body: @Test
      public void cmd() throws IOException, InterruptedException {
          String initCmd = "E:\\gradle\\gradle-4.6\\bin\\gradle.bat propertiesInit";
          String str = ShellUtil.cmd(initCmd, null, "E:/codes/test");
          System.out.println(str);
      }
test_case.class_method_signature: ShellUtilTest.cmd()
test_case.full_signature: @Test public void cmd()
test_case.identifier: cmd
test_case.invocations: cmd println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void cmd()
focal_class.file: jcodes-core/src/main/java/com/czarea/jcodes/util/ShellUtil.java
focal_class.identifier: ShellUtil
focal_class.class_method_signature: ShellUtil.cmd(String cmd, String[] envp, String dir)
focal_class.full_signature: public static String cmd(String cmd, String[] envp, String dir)
focal_class.identifier: cmd
focal_class.modifiers: public static
focal_class.parameters: (String cmd, String[] envp, String dir)
focal_class.return: String
focal_class.signature: String cmd(String cmd, String[] envp, String dir)
focal_method.body: public static String cmd(String cmd, String[] envp, String dir) throws IOException, InterruptedException {
          Path path = Paths.get(dir);
          if (!Files.exists(path)) {
              Files.createDirectories(path);
          }
          Process process = Runtime.getRuntime().exec(cmd, envp, new File(dir));
          InputStream is = process.getInputStream();
          BufferedReader reader = new BufferedReader(new InputStreamReader(is));
          process.waitFor();
          StringBuffer stringBuffer = new StringBuffer();
          String str;
          while ((str = reader.readLine()) != null) {
              stringBuffer.append(str).append("\r\n");
          }
          return stringBuffer.toString();
      }
focal_method.class_method_signature: ShellUtil.cmd(String cmd, String[] envp, String dir)
focal_method.full_signature: public static String cmd(String cmd, String[] envp, String dir)
focal_method.identifier: cmd
focal_method.invocations: get exists createDirectories exec getRuntime getInputStream waitFor readLine append append toString
focal_method.modifiers: public static
focal_method.parameters: (String cmd, String[] envp, String dir)
focal_method.return: String
focal_method.signature: String cmd(String cmd, String[] envp, String dir)