예제 #1
0
 /**
  * Resolves this path against another relative path.
  *
  * @param relativeUnixPath the relative path to resolve against
  * @return a new {@link AbsoluteUnixPath} representing the resolved path
  */
 public AbsoluteUnixPath Resolve(RelativeUnixPath relativeUnixPath)
 {
     relativeUnixPath = relativeUnixPath ?? throw new ArgumentNullException(nameof(relativeUnixPath));
     ImmutableArray <string> .Builder newPathComponents =
         ImmutableArray.CreateBuilder <string>();
     newPathComponents.AddRange(PathComponents);
     newPathComponents.AddRange(relativeUnixPath.GetRelativePathComponents());
     return(new AbsoluteUnixPath(newPathComponents.ToImmutable()));
 }
예제 #2
0
 /**
  * Resolves this path against another relative Unix path in string form.
  *
  * @param relativeUnixPath the relative path to resolve against
  * @return a new {@link AbsoluteUnixPath} representing the resolved path
  */
 public AbsoluteUnixPath Resolve(string relativeUnixPath)
 {
     return(Resolve(RelativeUnixPath.Get(relativeUnixPath)));
 }