public void copy(final Transferer transferer, final LogSegmentData data) throws IOException {
        transferer.transfer(data.logSegment().toFile(), files.get(SEGMENT));
        transferer.transfer(data.offsetIndex().toFile(), files.get(OFFSET_INDEX));
        transferer.transfer(data.timeIndex().toFile(), files.get(TIME_INDEX));
        if (data.transactionIndex().isPresent()) {
            transferer.transfer(data.transactionIndex().get().toFile(), files.get(TRANSACTION_INDEX));
        }
        transferer.transfer(data.leaderEpochIndex(), files.get(LEADER_EPOCH_CHECKPOINT));
        transferer.transfer(data.producerSnapshotIndex().toFile(), files.get(PRODUCER_SNAPSHOT));
    }
Creates a fileset instance for the physical set of files located under the given topic-partition directory.
The fileset MUST exist on the file system with the given uuid.

@param tpDirectory The topic-partition directory which this fileset's segment belongs to.
@param uuid The expected UUID of the fileset.
@return A new fileset instance.
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogSegmentFileset.java