Describe the bug
Directory.GetDirectories(path,pattern,searchOption) returns nothing when the 3rd parameter use SearchOption.TopDirectoryOnly, just like this Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly)
To Reproduce
Steps to reproduce the behavior:
- copy these code bellow which I just writed in my unit test to create the mock files and directories
string projResoRoot = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "my-project");
string projectFile1 = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "__node__info__file__");
string projectFile2 = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "my-project", "Biz/Rule", "__node__info__file__");
string projectFile3 = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "my-project", "Biz/Rule", "Models.vl.json");
string projectFile4 = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "my-project", "Biz/Rule", "Consts.cl.json");
string projectFile5 = Path.Combine("F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "my-project", "Biz/Rule", "MyRule.rs.json");
MockFileSystem mockFileSystem = new MockFileSystem(new Dictionary<string, MockFileData> {
{ projResoRoot, new MockDirectoryData()},
{ projectFile1, new MockFileData("") },
{ projectFile2, new MockFileData("{\"Name\":\"my-project\",\"_dataDic\":{}}") },
{ projectFile3, new MockFileData("{\"Name\":\"/my-project/Models.vl.json\",\"_dataDic\":{}}") },
{ projectFile4, new MockFileData("{\"Name\":\"/my-project/Consts.cl.json\",\"_dataDic\":{}}") },
{ projectFile5, new MockFileData("{\"Name\":\"/my-project/MyRule.rs.json\",\"_dataDic\":{}}") }
});
- it's create these files and directories :

-
call the method mockFileSystem.Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly)
-
it returns nothing, but should be "my-project" directories under "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource".

Expected behavior
it should be "my-project" directory under "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", just like System.IO.Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly) did .
The path "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource" also really exist on my computer disk which now contians "t1" "t2" directories ,System.IO.Directories works right :

Additional context
Nothing else . GOOD JOB man, nice unit test utils, thanks so much !
Describe the bug
Directory.GetDirectories(path,pattern,searchOption) returns nothing when the 3rd parameter use SearchOption.TopDirectoryOnly, just like this
Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly)To Reproduce
Steps to reproduce the behavior:
call the method
mockFileSystem.Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly)it returns nothing, but should be "my-project" directories under "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource".
Expected behavior
it should be "my-project" directory under "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", just like
System.IO.Directory.GetDirectories(@"F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource", "", SearchOption.TopDirectoryOnly)did .The path "F:\BeflamRule\src\Beflam.Rule.WebApi\bin\Debug\netcoreapp3.1\ProjectResource" also really exist on my computer disk which now contians "t1" "t2" directories ,System.IO.Directories works right :
Additional context
Nothing else . GOOD JOB man, nice unit test utils, thanks so much !