ncm: first pass at ContentManagerImpl refactor (missing the IntegratedImpls, won't link)

This commit is contained in:
Michael Scire authored and SciresM committed 2023-02-22 17:19:51 -08:00
1 parent d64ab354ad
commit 668cabd4a2
9 files changed
+1190 -364

No files matched your search

@@ -279,6 +279,23 @@ namespace ams::kvdb {
R_SUCCEED();
}
Result InitializeForReadOnlyArchiveFile(const char *path, size_t capacity, MemoryResource *mr) {
/* Ensure that the passed path is a directory. */
fs::DirectoryEntryType entry_type;
R_TRY(fs::GetEntryType(std::addressof(entry_type), path));
R_UNLESS(entry_type == fs::DirectoryEntryType_File, fs::ResultPathNotFound());
/* Set paths. */
m_path.Assign(path);
m_temp_path.Assign("");
/* Initialize our index. */
R_TRY(m_index.Initialize(capacity, mr));
m_memory_resource = mr;
R_SUCCEED();
}
Result Initialize(size_t capacity, MemoryResource *mr) {
/* This initializes without an archive file. */
/* A store initialized this way cannot have its contents loaded from or flushed to disk. */