Consider abstractions for filesystem actions
nbarnwell opened this issue · 2 comments
I'm writing some tests for a new feature (#222) and understandably for a tool like this there's a lot of use of filesystem operations like Environment.CurrentDirectory
. I'd like to replace these with abstractions (probably System.IO.Abstractions
for actual filesystem related stuff) and will go ahead with that unless someone replies here telling me I'm wasting my time and that PR will never be considered. :)
Spectre.IO is already a dependency - I brought it in when I swapped from System.CommandLine to Spectre.Console to get a v1 out the door. Sounds like I missed some refactorings.
Okay that's cool I'll look into that, then. I made a WorkingDirectory
thing (Solutions/Endjin.Adr.Cli/Abstractions/WorkingDirectory.cs) to replace a couple of usages of Environment.CurrentDirectory
but maybe Spectre.IO has something for that I can use instead. Thanks for the tip!