Class WorldCatalog
Scans and creates persisted worlds inside a common worlds root directory.
public sealed class WorldCatalog
- Inheritance
-
WorldCatalog
- Inherited Members
Constructors
WorldCatalog()
Creates a world catalog rooted at the default application worlds directory.
public WorldCatalog()
WorldCatalog(string, WorldStorage)
Creates a world catalog with explicit root path and storage dependencies.
public WorldCatalog(string worldsRootPath, WorldStorage worldStorage)
Parameters
worldsRootPathstringThe directory that contains all world folders.
worldStorageWorldStorageThe storage backend used to load and save world metadata.
Properties
WorldsRootPath
Gets the root directory that contains all persisted worlds.
public string WorldsRootPath { get; }
Property Value
Methods
CreateWorld(WorldCreationOptions)
Creates a new world folder with minimal metadata and returns the resulting catalog entry.
public WorldCatalogEntry CreateWorld(WorldCreationOptions options)
Parameters
optionsWorldCreationOptionsThe creation parameters for the new world.
Returns
- WorldCatalogEntry
The newly created world catalog entry.
EnumerateWorlds()
Enumerates all valid worlds currently persisted under the catalog root.
public IReadOnlyList<WorldCatalogEntry> EnumerateWorlds()
Returns
- IReadOnlyList<WorldCatalogEntry>
The discovered world entries sorted by most recent activity.