public static RemoteLogSegmentFileset openFileset(final File storageDir, final RemoteLogSegmentMetadata metadata) {

        final RemoteTopicPartitionDirectory tpDir = openTopicPartitionDirectory(
                metadata.remoteLogSegmentId().topicIdPartition(), storageDir);
        final File partitionDirectory = tpDir.getDirectory();
        final Uuid uuid = metadata.remoteLogSegmentId().id();
        final String startOffset = LogFileUtils.filenamePrefixFromOffset(metadata.startOffset());

        final Map<RemoteLogSegmentFileType, File> files = stream(RemoteLogSegmentFileType.values())
                .collect(toMap(identity(), type -> new File(partitionDirectory, type.toFilename(startOffset, uuid))));

        return new RemoteLogSegmentFileset(tpDir, metadata.remoteLogSegmentId(), files);
    }
Creates a new fileset located under the given storage directory for the provided remote log segment id.
The topic-partition directory is created if it does not exist yet. However the files corresponding to
the log segment offloaded are not created on the file system until transfer happens.

@param storageDir The root directory of the local tiered storage.
@param metadata Remote log metadata about a topic partition's remote log.
@return A new fileset instance.
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogSegmentFileset.java