SceneGate / Yarhl

Framework for the implementation of format converters like game assets or media files
https://scenegate.github.io/Yarhl/
MIT License
60 stars 10 forks source link

Enhance opening and importing files from disk #195

Closed pleonex closed 9 months ago

pleonex commented 9 months ago

Creating a BinaryFormat from a file on disk is painful because it needs to be done in a long line or two lines:

var fileStream = DataStreamFactory.FromDisk(path, FileOpenMode.Read);
using var binary = new BinaryFormat(fileStream);

We could create a constructor for BinaryFormat for its basic case of passing a path and the open mode.