Class CecalVirtualFileSystem
Memory-mapped runtime reader for .cecal archives. Loads the table of contents
into an in-memory dictionary for O(1) lookup and serves asset bytes from an
MemoryMappedFile view so reads cost zero heap allocation beyond
the destination buffer.
Inheritance
CecalVirtualFileSystem
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public sealed class CecalVirtualFileSystem : IVirtualFileSystem, IDisposable
Constructors
|
Edit this page
View Source
CecalVirtualFileSystem(string)
Declaration
public CecalVirtualFileSystem(string cecalPath)
Parameters
| Type |
Name |
Description |
| string |
cecalPath |
|
Properties
|
Edit this page
View Source
EntryCount
Declaration
public int EntryCount { get; }
Property Value
Methods
|
Edit this page
View Source
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
|
Edit this page
View Source
Exists(string)
Declaration
public bool Exists(string logicalPath)
Parameters
| Type |
Name |
Description |
| string |
logicalPath |
|
Returns
|
Edit this page
View Source
ResolveDirectoryToTemp(string)
Extracts all entries whose logical path starts with the given directory prefix
to temp files, preserving relative directory structure. Required for formats
like GLTF that reference companion files (.bin, textures) via relative URIs.
No-op for implementations that serve files directly from disk.
Declaration
public void ResolveDirectoryToTemp(string directoryPrefix)
Parameters
| Type |
Name |
Description |
| string |
directoryPrefix |
|
|
Edit this page
View Source
ResolveToTempFile(string)
Resolves the asset to an absolute filesystem path that a native loader
(e.g. Raylib.LoadModel) can consume directly. Packed implementations
extract to a cached temp file; loose implementations return the asset's
on-disk location unchanged. Returns null on miss.
Declaration
public string? ResolveToTempFile(string logicalPath)
Parameters
| Type |
Name |
Description |
| string |
logicalPath |
|
Returns
|
Edit this page
View Source
TryOpen(string, out Stream)
Opens a read-only, seekable Stream over the asset bytes.
The caller owns the stream and must dispose it. Returns false on miss.
Declaration
public bool TryOpen(string logicalPath, out Stream stream)
Parameters
Returns
|
Edit this page
View Source
TryReadAllBytes(string, out byte[])
Reads the entire asset into a new byte array. Returns false on miss.
Declaration
public bool TryReadAllBytes(string logicalPath, out byte[] bytes)
Parameters
| Type |
Name |
Description |
| string |
logicalPath |
|
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
TryReadAllText(string, out string)
Reads the entire asset as UTF-8 text. Returns false on miss.
Declaration
public bool TryReadAllText(string logicalPath, out string text)
Parameters
Returns
Implements