本文整理了Java中org.eclipse.jgit.util.FS.readPipe()
方法的一些代码示例,展示了FS.readPipe()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FS.readPipe()
方法的具体详情如下:
包路径:org.eclipse.jgit.util.FS
类名称:FS
方法名:readPipe
[英]Execute a command and return a single line of output as a String
[中]执行命令并以字符串形式返回单行输出
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
/**
* Execute a command and return a single line of output as a String
*
* @param dir
* Working directory for the command
* @param command
* as component array
* @param encoding
* to be used to parse the command's output
* @return the one-line output of the command or {@code null} if there is
* none
* @throws org.eclipse.jgit.errors.CommandFailedException
* thrown when the command failed (return code was non-zero)
*/
@Nullable
protected static String readPipe(File dir, String[] command,
String encoding) throws CommandFailedException {
return readPipe(dir, command, encoding, null);
}
代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit
v = readPipe(gitExe.getParentFile(),
new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Charset.defaultCharset().name(), env);
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
/**
* Execute a command and return a single line of output as a String
*
* @param dir
* Working directory for the command
* @param command
* as component array
* @param encoding
* to be used to parse the command's output
* @return the one-line output of the command or {@code null} if there is
* none
* @throws CommandFailedException
* thrown when the command failed (return code was non-zero)
*/
@Nullable
protected static String readPipe(File dir, String[] command,
String encoding) throws CommandFailedException {
return readPipe(dir, command, encoding, null);
}
代码示例来源:origin: berlam/github-bucket
/**
* Execute a command and return a single line of output as a String
*
* @param dir
* Working directory for the command
* @param command
* as component array
* @param encoding
* to be used to parse the command's output
* @return the one-line output of the command or {@code null} if there is
* none
* @throws org.eclipse.jgit.errors.CommandFailedException
* thrown when the command failed (return code was non-zero)
*/
@Nullable
protected static String readPipe(File dir, String[] command,
String encoding) throws CommandFailedException {
return readPipe(dir, command, encoding, null);
}
代码示例来源:origin: sonia.jgit/org.eclipse.jgit
v = readPipe(gitExe.getParentFile(),
new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Charset.defaultCharset().name(), env);
代码示例来源:origin: berlam/github-bucket
v = readPipe(gitExe.getParentFile(),
new String[] { "git", "--version" }, //$NON-NLS-1$ //$NON-NLS-2$
Charset.defaultCharset().name());
w = readPipe(gitExe.getParentFile(),
new String[] { "git", "config", "--system", "--edit" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
Charset.defaultCharset().name(), env);
内容来源于网络,如有侵权,请联系作者删除!