コード例 #1
0
ファイル: CopySpecImpl.java プロジェクト: jgibson/gradle
  public RelativePath getDestPath() {
    RelativePath parentPath;
    if (parentSpec == null) {
      parentPath = new RelativePath(false);
    } else {
      parentPath = parentSpec.getDestPath();
    }
    if (destDir == null) {
      return parentPath;
    }

    String path = destDir.toString();
    if (path.startsWith("/") || path.startsWith(File.separator)) {
      return RelativePath.parse(false, path);
    }

    return RelativePath.parse(false, parentPath, path);
  }
コード例 #2
0
ファイル: MapFileTree.java プロジェクト: tariq1890/gradle
 public void add(String path, Action<OutputStream> contentWriter) {
   elements.put(RelativePath.parse(true, path), contentWriter);
 }