UweKeim / ZetaLongPaths

A .NET library to access files and directories with more than 260 characters length.

Home Page:https://nuget.org/packages/ZetaLongPaths

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ZlpFileInfo OpenRead or OpenWrite unexpected scenario

MustafaDaoud90 opened this issue · comments

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.