private File[] getTopicPartitionFiles(TopicPartition topicPartition, Set<File> logDirs) {
        File[] files = null;
        for (File brokerDir : logDirs) {
            files = brokerDir.listFiles((dir, name) -> name.equals(topicPartition.toString()));
            // currently, we only expect one topic partition in one log dir
            if (files != null && files.length != 0) {
                break;
            }
        }
        return files;
    }
Check if the given offset is present in the first local segment of the given topic-partition.
@param topicPartition The topic-partition to check.
@param firstLogFileBaseOffset The base offset of the first local segment.
@param offsetToSearch The offset to search.
@return true if the offset is present in the first local segment, false otherwise.
storage/src/test/java/org/apache/kafka/tiered/storage/utils/BrokerLocalStorage.java