public static RemoteTopicPartitionDirectory openExistingTopicPartitionDirectory(final String dirname,
                                                                                    final File storageDirectory) {
        final Uuid uuid = Uuid.fromString(substr(dirname, GROUP_UUID));
        final String topic = substr(dirname, GROUP_TOPIC);
        final int partition;
        try {
            partition = Integer.parseInt(substr(dirname, GROUP_PARTITION));
        } catch (NumberFormatException ex) {
            throw new IllegalArgumentException(format(
                    "Invalid format for topic-partition directory: %s", dirname), ex);
        }

        TopicPartition tp = new TopicPartition(topic, partition);
        TopicIdPartition idPartition = new TopicIdPartition(uuid, tp);
        final RemoteTopicPartitionDirectory directory = openTopicPartitionDirectory(idPartition, storageDirectory);
        if (!directory.didExist()) {
            throw new IllegalArgumentException(format("Topic-partition directory %s not found", dirname));
        }
        return directory;
    }
Creates a new {@link RemoteTopicPartitionDirectory} instance for the directory with the given
name under the root directory of the local tiered storage. This method throws an
{@link IllegalArgumentException} if the directory does not exist.
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteTopicPartitionDirectory.java