private static boolean startsWith(List<?> list, List<?> other) {
    return list.size() >= other.size() && list.subList(0, other.size()).equals(other);
  }
Returns true if list starts with all elements of other in the same order.
jimfs/src/main/java/com/google/common/jimfs/JimfsPath.java