public static RemoteLogSegmentFileType getFileType(final String filename) {
            String fileSuffix = substr(filename, GROUP_FILE_TYPE);
            for (RemoteLogSegmentFileType fileType : RemoteLogSegmentFileType.values()) {
                if (fileType.getSuffix().equals(fileSuffix)) {
                    return fileType;
                }
            }
            throw new IllegalArgumentException(format("Not a remote log segment file: %s", filename));
        }
Returns the nature of the data stored in the file with the provided name.
storage/src/test/java/org/apache/kafka/server/log/remote/storage/RemoteLogSegmentFileset.java