FFileTypes
- Module
- Core
- Header
#include "Core/FileTypes.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr const char* | GitAttributesBegin | Default "# BEGIN file types". |
static constexpr const char* | GitAttributesEnd | Default "# END file types". |
Public functions
| Returns | Name | Description |
|---|---|---|
TArrayView<const FFileTypeInfo> | All | |
const FFileTypeInfo& | Info | |
const char* | Extension | The canonical extension, dot included: ".mat". |
std::vector<std::string> | ReadableExtensions | Canonical, alias and legacy spellings, canonical first — what a reader claims. |
std::vector<std::string> | ExtensionsInCategory | |
EFileType | FromExtension | Any spelling, with or without the leading dot, any case. |
EFileType | FromPath | The longest spelling the path ends with, so "World.mmap.sectors" is a sector manifest and "rock.png.mdfmeta" a sidecar. |
bool | Is | |
bool | IsCategory | |
bool | IsExtensionOf | |
bool | IsLegacyExtension | |
bool | IsLegacyPath | |
std::string | MatchedSuffix | The spelling path ends with, as the table writes it; empty when no row claims it. |
std::string | WithExtension | path with whatever spelling of type it ends in (or its last extension when none) replaced by the canonical one. |
EFileType | FromPackageClass | |
bool | HasPackageClass | |
bool | CanHoldPackage | True for a type whose files may carry a package summary: any asset or level file (a migrated text asset leads with one, an older one does not) and the legacy generic packages. |
EFileType | PackageTypeFor | The type a package of assetClass is saved as. |
bool | IsPackagePath | |
std::string | GlobPattern | "*.mat;*.mdfmat;*.mmat" for a native file dialog. |
std::string | Manifest | One line per row, the same fields the MBT mirror holds. |
std::string | GitAttributesBlock | The .gitattributes block the table implies, between GitAttributesBegin and GitAttributesEnd: MDF text types LF and merged by property, Visual Scripting by node id, binary bulk types in LFS with a lock. |
std::string | WithGitAttributesBlock | existing (a .gitattributes, possibly empty) with its file-type block replaced by the current one, or the block appended when it has none. |
const char* | EncodingName | |
const char* | CategoryName |
Function details
All
static TArrayView<const FFileTypeInfo> All()Info
static const FFileTypeInfo& Info(EFileType type)Extension
static const char* Extension(EFileType type)The canonical extension, dot included: ".mat".
ReadableExtensions
static std::vector<std::string> ReadableExtensions(EFileType type)Canonical, alias and legacy spellings, canonical first — what a reader claims. Legacy spellings: Removal date: 2027-04-19, with RenameLegacyExtensions.
ExtensionsInCategory
static std::vector<std::string> ExtensionsInCategory(EFileCategory category, bool includeLegacy = true)FromExtension
static EFileType FromExtension(std::string_view extension)Any spelling, with or without the leading dot, any case.
FromPath
static EFileType FromPath(std::string_view path)The longest spelling the path ends with, so "World.mmap.sectors" is a sector manifest and "rock.png.mdfmeta" a sidecar.
Is
static bool Is(std::string_view path, EFileType type)IsCategory
static bool IsCategory(std::string_view path, EFileCategory category)IsExtensionOf
static bool IsExtensionOf(std::string_view extension, EFileType type)IsLegacyExtension
static bool IsLegacyExtension(std::string_view extension)IsLegacyPath
static bool IsLegacyPath(std::string_view path)MatchedSuffix
static std::string MatchedSuffix(std::string_view path)The spelling path ends with, as the table writes it; empty when no row claims it.
WithExtension
static std::string WithExtension(std::string_view path, EFileType type)path with whatever spelling of type it ends in (or its last extension when none) replaced by the canonical one.
FromPackageClass
static EFileType FromPackageClass(std::string_view assetClass)HasPackageClass
static bool HasPackageClass(EFileType type, std::string_view assetClass)CanHoldPackage
static bool CanHoldPackage(EFileType type)True for a type whose files may carry a package summary: any asset or level file (a migrated text asset leads with one, an older one does not) and the legacy generic packages.
PackageTypeFor
static EFileType PackageTypeFor(std::string_view assetClass)The type a package of assetClass is saved as. A reflected object class no row names is a data asset.
IsPackagePath
static bool IsPackagePath(std::string_view path)GlobPattern
static std::string GlobPattern(EFileType type, bool includeLegacy = true)"*.mat;*.mdfmat;*.mmat" for a native file dialog.
Manifest
static std::string Manifest()One line per row, the same fields the MBT mirror holds.
GitAttributesBlock
static std::string GitAttributesBlock()The .gitattributes block the table implies, between GitAttributesBegin and GitAttributesEnd: MDF text types LF and merged by property, Visual Scripting by node id, binary bulk types in LFS with a lock. Byte for byte what MBT's FileTypes.GitAttributesBlock() returns — the engine repo commits it, a new project is scaffolded with it, and opening a project refreshes it.
WithGitAttributesBlock
static std::string WithGitAttributesBlock(const std::string& existing)existing (a .gitattributes, possibly empty) with its file-type block replaced by the current one, or the block appended when it has none.
EncodingName
static const char* EncodingName(EFileEncoding encoding)CategoryName
static const char* CategoryName(EFileCategory category)