Class PackWriter¶
Namespace: Apogee.Content.Packs
Assembly: Apogee.Content.dll
Writes a pack: files added with game.pack, game_001.pack…) at
public sealed class PackWriter : IDisposable
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
PackWriter(string, PackWriterOptions?)¶
public PackWriter(string path, PackWriterOptions? options = null)
Parameters¶
path string
options PackWriterOptions?
Methods¶
Add(string, ReadOnlySpan<byte>)¶
Adds a file at path (relative, as in textures/ground.png).
public void Add(string path, ReadOnlySpan<byte> data)
Parameters¶
path string
data ReadOnlySpan<byte>
Exceptions¶
The path is not valid or is in the pack already.
AddFile(string, string)¶
public void AddFile(string path, string physicalPath)
Parameters¶
path string
physicalPath string
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Finish()¶
Writes the last part. Returns the files written, the first one first.
public IReadOnlyList<string> Finish()
Returns¶
Remove(string)¶
Takes path away from the packs this one is mounted over.
public void Remove(string path)
Parameters¶
path string