I added an alternative code-path using an input string rather than reading from a file.
I would require an empty FileInfo object as I have many instances which access the Name
, Length
and Extension
property.
Ideally I am looking for something like
FileInfo _fileinfo = new FileInfo(File.Empty);
However there is only one FileInfo
constructor, which appears to require a valid file. Any solution to creating an empty-initialized FileInfo object, which does not require the creation of an empty dummy file?