It appears that the MockFileSystem constructor calls real filesystem API when the currentDirectory parameter is left empty.
The current directory is then set as C:\Users\...\AppData\Local\Temp
I suspect the following code
public MockFileSystem(IDictionary<string, MockFileData> files, string currentDirectory = "")
{
if (string.IsNullOrEmpty(currentDirectory))
{
currentDirectory = IO.Path.GetTempPath();
}
...
in https://github.com/System-IO-Abstractions/System.IO.Abstractions/blob/4b8ff76fb410e15d26ab2cab807117323de08299/System.IO.Abstractions.TestingHelpers/MockFileSystem.cs#L22
It appears that the
MockFileSystemconstructor calls real filesystem API when thecurrentDirectoryparameter is left empty.The current directory is then set as
C:\Users\...\AppData\Local\TempI suspect the following code
in https://github.com/System-IO-Abstractions/System.IO.Abstractions/blob/4b8ff76fb410e15d26ab2cab807117323de08299/System.IO.Abstractions.TestingHelpers/MockFileSystem.cs#L22