org.eclipse.jgit.util.FS.relativize()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.eclipse.jgit.util.FS.relativize()方法的一些代码示例,展示了FS.relativize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FS.relativize()方法的具体详情如下:
包路径:org.eclipse.jgit.util.FS
类名称:FS
方法名:relativize

FS.relativize介绍

[英]See org.eclipse.jgit.util.FileUtils#relativizePath(String,String,String,boolean).
[中]见组织。日食jgit。util。FileUtils#relativizePath(字符串,字符串,字符串,布尔值)。

代码示例

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

/**
 * Expresses <code>other</code> as a relative file path from
 * <code>base</code>. File-separator and case sensitivity are based on the
 * current file system.
 *
 * See also
 * {@link org.eclipse.jgit.util.FileUtils#relativizePath(String, String, String, boolean)}.
 *
 * @param base
 *            Base path
 * @param other
 *            Destination path
 * @return Relative path from <code>base</code> to <code>other</code>
 * @since 4.8
 */
public static String relativizeNativePath(String base, String other) {
  return FS.DETECTED.relativize(base, other);
}

代码示例来源:origin: org.eclipse.jgit/org.eclipse.jgit

else
  runDirectory = repository.getWorkTree();
final String cmd = relativize(runDirectory.getAbsolutePath(),
    hookPath);
ProcessBuilder hookProcess = runInShell(cmd, args);

代码示例来源:origin: berlam/github-bucket

/**
 * Expresses <code>other</code> as a relative file path from
 * <code>base</code>. File-separator and case sensitivity are based on the
 * current file system.
 *
 * See also
 * {@link org.eclipse.jgit.util.FileUtils#relativizePath(String, String, String, boolean)}.
 *
 * @param base
 *            Base path
 * @param other
 *            Destination path
 * @return Relative path from <code>base</code> to <code>other</code>
 * @since 4.8
 */
public static String relativizeNativePath(String base, String other) {
  return FS.DETECTED.relativize(base, other);
}

代码示例来源:origin: berlam/github-bucket

else
  runDirectory = repository.getWorkTree();
final String cmd = relativize(runDirectory.getAbsolutePath(),
    hookPath);
ProcessBuilder hookProcess = runInShell(cmd, args);

代码示例来源:origin: sonia.jgit/org.eclipse.jgit

else
  runDirectory = repository.getWorkTree();
final String cmd = relativize(runDirectory.getAbsolutePath(),
    hookPath);
ProcessBuilder hookProcess = runInShell(cmd, args);

相关文章