UweKeim / ZetaLongPaths

A .NET library to access files and directories with more than 260 characters length.
https://nuget.org/packages/ZetaLongPaths
MIT License
142 stars 28 forks source link

ZlpFileInfo OpenRead or OpenWrite unexpected scenario #43

Open MustafaDaoud90 opened 2 years ago

MustafaDaoud90 commented 2 years ago

when use ZlpFileInfo(path).OpenRead() or ZlpFileInfo(path).OpenWrite() when pass the file path does not exist, it will create a new file with the same path and file name provided, this is wrong does not meet the expected as System.IO.File.Open(path, FileMode.Open, System.IO.FileAccess.Read) or System.IO.File.Open(path, FileMode.Open, System.IO.FileAccess.ReadWrite).

but when using System.IO.File.Open(path, FileMode.Open, System.IO.FileAccess.Read) and pass file path does not exist will be return exception could not find the path provided.

I need the same as System.IO.File.Open(path, FileMode.Open, System.IO.FileAccess.Read) if possible.