Class CecalWriter
Streams asset files into a .cecal archive with atomic replacement on successful
Complete(). See CECAL_FORMAT.md for the on-disk layout.
public sealed class CecalWriter : IDisposable
- Inheritance
-
CecalWriter
- Implements
- Inherited Members
Remarks
Usage:
using var writer = new CecalWriter(outputPath);
writer.AddEntry("assets/textures/player.png", absolutePath);
...
writer.Complete();
If Complete() is not called before Dispose(), the .tmp
file is deleted and any existing final file is left untouched.
Constructors
CecalWriter(string)
public CecalWriter(string outputPath)
Parameters
outputPathstring
Methods
AddEntry(string, string)
Streams the bytes of sourcePath into the blob region and
records a TOC entry under logicalPath. The logical path is
normalized to forward slashes; case is preserved.
public void AddEntry(string logicalPath, string sourcePath)
Parameters
Complete()
Writes the TOC, patches the header, flushes, closes the temp stream, and atomically renames the temp file over the final output path.
public void Complete()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()