public static Path dataFileToIndex(final Path dataName) {
    return Path.of(dataName.toString().replaceAll("(.*)[-.]\\d\\d\\d\\d\\.(.)dat", "$1.$2idx"));
  }
Data file to index path.

@param dataName the data name
@return the path
util/src/main/java/org/hyperledger/besu/util/io/RollingFileWriter.java