peteraritchie / LongPath

drop-in library to support long paths in .NET
GNU Lesser General Public License v3.0
112 stars 43 forks source link

FileSystemWatcher is not implemented #54

Closed GitMarJansen closed 7 years ago

GitMarJansen commented 7 years ago

Thanks for the nice package that solves 90% of my problems. The only thing left is that I am using a FileSystemWatcher. But that one is not implemented in LongPath. It fails with a pathtoolong exception. Are there any plans to include this?

peteraritchie commented 7 years ago

That's an interesting request. And makes complete sense. Unfortunately it's not necessarily part of the LongPath library, it's really a re-write of FileSystemWatcher. It's something I can look into to see if it's worthwhile to do in the future.

GitMarJansen commented 7 years ago

Hi Peter, I discovered that only setting the path will give the path too long exception. Raising is no problem. In my project we can set the watcher on a safe level (< 248 chars) so we can keep using the system.io-version. I guess dotnet framework 4.6.2 will make this package obsolete (but I am not yet allowed to use it in production)

peteraritchie commented 7 years ago

@GitMarJansen After a bit of research there are possible issues with the underlining watcher implementation that may be unrelated to anything else supporting long paths. e.g. the watch seems to have some fixed-size internal buffers that include filename data and if the filename is too long, the buffer simply can't support it.