code: public UnixPath subpath(int beginIndex, int endIndex) {
      if (path.isEmpty() && beginIndex == 0 && endIndex == 1) {
        return this;
      }
      checkArgument(beginIndex >= 0 && endIndex > beginIndex);
      List<String> subList;
      try {
        subList = getParts().subList(beginIndex, endIndex);
      } catch (IndexOutOfBoundsException e) {
        throw new IllegalArgumentException();
      }
      return new UnixPath(permitEmptyComponents, JOINER.join(subList));
    }
docs: Returns specified range of sub-components in path joined together.
  
  @see java.nio.file.Path#subpath(int, int)