3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/platform/Result.h"
19namespace Core {
class Path; }
20namespace Core {
class Result; }
23namespace ExternalFileLevelStorage {
26MCNAPI ::Bedrock::Result<void>
27_readLevelDataFromFile(::Core::Path
const& datFilename, ::std::string
const& worldID, ::LevelData& levelData);
29MCNAPI
bool _writeLevelDat(::Core::Path
const& datFilename, ::LevelData
const& levelData);
31MCNAPI
void copyLevelInfoToDiskCache(::Core::Path
const& levelRootPath,
bool onlyIfNotExisting);
33MCNAPI ::std::unique_ptr<::PackAccessStrategy> getAccessStrategy(
34 ::Core::Path
const& levelDirectory,
35 ::ContentIdentity
const& contentIdentity,
36 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>
const& keyProvider
39MCNAPI ::std::vector<::std::string>
const getImportantFiles();
42MCNAPI
bool isLevelCloudSave(::Core::Path
const& directory);
45MCNAPI
bool isLevelMarkedForSync(::Core::Path
const& directory);
47MCNAPI
void makeReadableLevelnameFile(::Core::Path
const& fullPath, ::std::string
const& name);
49MCNAPI ::Core::Result readLevelDataFromData(::std::string
const& dataStr, ::LevelData& levelData);
51MCNAPI ::Bedrock::Result<bool>
52readLevelDataFromFile(::Core::Path
const& directory, ::std::string
const& levelId, ::LevelData& levelData);
54MCNAPI ::Bedrock::Result<bool> readLevelDataFromFile(
55 ::Core::Path
const& directory,
56 ::std::string
const& levelId,
57 ::LevelData& levelData,
58 ::IMinecraftEventing* eventing
61MCNAPI
bool readShallowLevelSummaryFromSyncFile(
62 ::Core::Path
const& directory,
63 ::std::string
const& levelId,
64 ::LevelSummary& summary
67MCNAPI
bool readSyncFileData(
68 ::Core::Path
const& directory,
69 ::std::string& levelName,
71 int64& remoteTimestamp,
75MCNAPI
void saveLevelData(
76 ::Core::Path
const& levelPath,
77 ::std::string
const& levelId,
78 ::LevelData
const& levelData,
82MCNAPI
void saveLevelDataToPath(::Core::Path
const& fullPath, ::std::string
const& levelData, ::LevelData
const&);
84MCNAPI
void saveLevelDisplayDataToCache(
85 ::std::string
const& levelId,
86 ::LevelData
const& levelData,
87 ::gsl::not_null<::TaskGroup*> taskGroup
91MCNAPI
void syncLevelInfoCache(::std::unordered_set<::Core::PathBuffer<::std::string>>
const& levelRootPaths);
94MCNAPI ::Core::Result validateLevelDat(::Core::Path filePath);
99MCNAPI ::std::atomic<bool>& writingToCache();
Definition ContentIdentity.h:8
Definition IContentKeyProvider.h:13
Definition IMinecraftEventing.h:138
Definition LevelData.h:55
Definition PackAccessStrategy.h:26
Definition TaskGroup.h:55
Definition LevelSummary.h:30