Describe the bug
Clearing the FileAttributes.Directory flag on a mocked directory will convert it into a file. Though it should be noted that fs.Directory.Exists will still report it as present.
To Reproduce
varfs=newMockFileSystem();vardir=fs.DirectoryInfo.New("dir");dir.Attributes=0;fs.File.WriteAllText("/dir/file","");Will result in an exception, even though this would still work on a real IO.
Describe the bug
Clearing the
FileAttributes.Directoryflag on a mocked directory will convert it into a file. Though it should be noted thatfs.Directory.Existswill still report it as present.To Reproduce
Will result in an exception, even though this would still work on a real IO.