Plasma Engine  2.0
Loading...
Searching...
No Matches
FileSystemConfig.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/Reflection/Reflection.h>
5#include <Foundation/Strings/String.h>
6
7class PL_FOUNDATION_DLL plApplicationFileSystemConfig
8{
9public:
10 static constexpr const plStringView s_sConfigFile = ":project/RuntimeConfigs/DataDirectories.ddl"_plsv;
11
12 plResult Save(plStringView sPath = s_sConfigFile);
13 void Load(plStringView sPath = s_sConfigFile);
14
16 void Apply();
17
19 static void Clear();
20
21 plResult CreateDataDirStubFiles();
22
24 {
25 plString m_sDataDirSpecialPath;
26 plString m_sRootName;
29
31 {
32 m_bWritable = false;
33 m_bHardCodedDependency = false;
34 }
35
36 bool operator==(const DataDirConfig& rhs) const
37 {
38 return m_bWritable == rhs.m_bWritable && m_sDataDirSpecialPath == rhs.m_sDataDirSpecialPath && m_sRootName == rhs.m_sRootName;
39 }
40 };
41
42 bool operator==(const plApplicationFileSystemConfig& rhs) const { return m_DataDirs == rhs.m_DataDirs; }
43
45};
46
47
49
50PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plApplicationFileSystemConfig);
51PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plApplicationFileSystemConfig_DataDirConfig);
Definition FileSystemConfig.h:8
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Definition FileSystemConfig.h:24
bool m_bWritable
Whether the directory is going to be mounted for writing.
Definition FileSystemConfig.h:27
bool m_bHardCodedDependency
If set to true, this indicates that it may not be removed by the user (in a config dialog)
Definition FileSystemConfig.h:28
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54