code: public static boolean isSegmentsFile(String name) {
      return name.startsWith(IndexFileNames.SEGMENTS)
          && !name.equals(IndexFileNames.SEGMENTS_GEN);
    }
docs: Check if the file is a segments_N file
  @param name
  @return true if the file is a segments_N file