SharpGLTF icon indicating copy to clipboard operation
SharpGLTF copied to clipboard

[Feature Request] Switch to using System.IO.Abstractions for file logic

Open MeltyPlayer opened this issue 1 month ago • 1 comments

Hello! This is an awesome library you've put together, thank you so much for developing this!

I wanted to request switching the file IO logic from the built-ins (i.e. System.IO.File.WriteAllBytes()) to their System.IO.Abstractions equivalents? This library allows you to stub the filesystem for tests, allowing you to avoid the significant overhead of reading to/writing from the filesystem.

For an example of how this would be beneficial, I have a tool for ripping models with their rigs/animations from video games, and most of my tests are end-to-end tests where I verify the exported model matches what was expected. Currently, this requires writing the GLTF output files to a temporary directory and then comparing those to the expected outputs, which is relatively slow. I've been hoping to stub SharpGLTF's filesystem so that these files are written within RAM instead, which should significantly improve test latency.

MeltyPlayer avatar May 25 '24 17:05 MeltyPlayer