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

:sparkles: Support opening nodes from Windows symlinks #180

Closed pleonex closed 2 years ago

pleonex commented 2 years ago

Description

Support opening a node from a symbolic link file, redirecting to the target instead of opening the symlink itself. This is a feature provided by FileStream of .NET 6, but it requires some small adjustments in the behavior of LazyFileStream. Also fix an issue where opening a non-existing file for writing was throwing an exception.

Example

  1. Create a symbolic link with
mklink link.nds original.nds
  1. Open it like a regular file
var node = NodeFactory.FromFile("link.nds"); // this is opening original.nds

It can be very useful to link to test files without copying them in each repo.