class LocalResourceId implements ResourceId {

  @Override
  public LocalResourceId resolve(String other, ResolveOptions resolveOptions) {
    checkState(isDirectory(), "Expected the path is a directory, but had [%s].", pathString);
    checkArgument(
        resolveOptions.equals(StandardResolveOptions.RESOLVE_FILE)
            || resolveOptions.equals(StandardResolveOptions.RESOLVE_DIRECTORY),
        "ResolveOptions: [%s] is not supported.",
        resolveOptions);
    checkArgument(
        !(resolveOptions.equals(StandardResolveOptions.RESOLVE_FILE) && other.endsWith("/")),
        "The resolved file: [%s] should not end with '/'.",
        other);
    if (SystemUtils.IS_OS_WINDOWS) {
      return resolveLocalPathWindowsOS(other, resolveOptions);
    } else {
      return resolveLocalPath(other, resolveOptions);
    }
  }

  private  LocalResourceId(Path path, boolean isDirectory);

}