Describe the bug
Both native Directory.Exists and the wrapper FileSystem.Directory.Exists methods successfully pick up the root directory using a /. However, MockFileSystem.Directory.Exists does not on Windows.
It's also worth noting that MockFileSystem.DirectoryInfo.Exists does work.
To Reproduce
[Test]publicasyncTaskMockDirectory_Exists_ShouldReturnTrue_IfArgIsFrontSlashAndRootDirExists(){stringtestDir=XFS.Path(@"c:\foo\bar\");varfileSystem=newMockFileSystem(newDictionary<string,MockFileData>{{testDir,newMockDirectoryData()}});awaitThat(fileSystem.Directory.Exists("/")).IsEqualTo(true);}Expected behavior
Test shouldn't fail on Windows.
Additional context
OS: Windows 11
.NET Version: net9.0/net8.0/net6.0/net472
Package Version: 22.0.11
Describe the bug
Both native Directory.Exists and the wrapper FileSystem.Directory.Exists methods successfully pick up the root directory using a
/. However, MockFileSystem.Directory.Exists does not on Windows.It's also worth noting that MockFileSystem.DirectoryInfo.Exists does work.
To Reproduce
Expected behavior
Test shouldn't fail on Windows.
Additional context
OS: Windows 11
.NET Version: net9.0/net8.0/net6.0/net472
Package Version: 22.0.11