1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00
Files
OpenRCT2/src/openrct2/FileClassifier.h
2025-03-25 22:47:08 +01:00

55 lines
1.1 KiB
C++

/*****************************************************************************
* Copyright (c) 2014-2025 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
#include "core/StringTypes.h"
enum class FileExtension
{
Unknown,
DAT,
SC4,
SV4,
TD4,
SC6,
SV6,
TD6,
PARK,
};
#include <string>
namespace OpenRCT2
{
struct IStream;
}
enum class FileType
{
undefined,
object,
savedGame,
scenario,
trackDesign,
park,
};
struct ClassifiedFileInfo
{
FileType Type = FileType::undefined;
uint32_t Version = 0;
};
constexpr uint32_t kFileTypeS4Cutoff = 2;
bool TryClassifyFile(const std::string& path, ClassifiedFileInfo* result);
bool TryClassifyFile(OpenRCT2::IStream* stream, ClassifiedFileInfo* result);
FileExtension GetFileExtensionType(u8string_view path);