Open ericnewton76 opened 2 years ago
The LongPath library sounds pretty interesting for this common issue. Thanks for the hint! 😄
I'm proposing a merge of that code into the standard IFileSystem implementation or as an alternative IFileSystem implementation.
I think I'd prefer the latter. Maybe as a sister project in the https://github.com/TestableIO org? Some users may not want the additional dependency or might be depending on some specific System.IO behaviour cross-platform.
Also, the LongPath
library is LGPL-3.0-only, while this project is MIT licensed, so that it cannot simply be bundled with System.IO.Abstractions. It additionally targets only older .NET Framework versions, so that it couldn't be integrated that easily.
Thanks for this issue @ericnewton76!
I agree with @hangy that the LongPath library sounds very useful! I'd also prefer to go forward with the "alternative IFileSystem implementation" you proposed in a separate repository. I could set something up in the TestableIO
org, but only if there's at least one additional maintainer to help set it up and handle input.
Consider https://github.com/alphaleonis/AlphaFS, as it's MIT licensed too and could easily be bundled with System.IO.Abstractions.
What: Please create the sister project (System.IO.Abstractions.AlphaFS or System.IO.Abstractions.Alphaleonis ?) Why: We will provide the AlphaFS specific FileSystem implementation (AlphaFileSystem or AlphaleonisFileSystem ?) However, it will contain only what we already implemented anyway. Everything else will throw a NotImplementedException. We have our own System IO abstraction right now and wanna replace it with this one here.
@patrickdreyer Wow, thanks! I'll take care in the next days. Who should I add as maintainers?
@fgreinacher myself? :-) Actually, I'll get some apprentices and I will let them to take care of the implementation.
@patrickdreyer We (well, mostly @vbreuss 😄) recently did some work to use the abstractions in another project: https://github.com/Testably/Testably.Abstractions/pull/225.
We did not pull it into the TestableIO
, but linked it from the README instead.
Would a similar approach also work for you?
Is your feature request related to a problem? Please describe. Long paths in windows >260characters cause issues. The underlying System.IO.File use Win32 APIs that fail to handle >260 cahracters properly.
Describe the solution you'd like Theres a LongPaths repo that implements long file path support: (https://github.com/peteraritchie/LongPath/) I'm proposing a merge of that code into the standard IFileSystem implementation or as an alternative IFileSystem implementation.
Describe alternatives you've considered (https://github.com/peteraritchie/LongPath/)
Additional context Add any other context or screenshots about the feature request here. I would possibly be the one to submit a pullrequest merging this in.