code: static File createSegmentFile(String name, File directory, long id) {
      return new File(directory, String.format("%s-%d.log", checkNotNull(name, "name cannot be null"), id));
    }
docs: Creates a segment file for the given directory, log name, segment ID, and segment version.