Added a !File.Exists(path) in the FromFile(string path, FileOpenMode mode) with a check that detects if you are using a Read or an Append FileOpenMode.
The check is not needed in the FromFile(string path, FileOpenMode mode, long offset, long length) as the FileInfo invoke already detects if the file exists before opening, a FileNotFoundException will be thrown in both cases.
Description
Added a
!File.Exists(path)
in theFromFile(string path, FileOpenMode mode)
with a check that detects if you are using aRead
or anAppend FileOpenMode
. The check is not needed in theFromFile(string path, FileOpenMode mode, long offset, long length)
as theFileInfo
invoke already detects if the file exists before opening, aFileNotFoundException
will be thrown in both cases.Closes #135