3 implementations of IFileSystem
dotnet.Tests (1)
ConfigurerTests\GivenAFirstTimeUseNoticeSentinel.cs (1)
129private class FileSystemMock : IFileSystem
Microsoft.DotNet.InternalAbstractions (1)
FileSystemWrapper.cs (1)
6internal class FileSystemWrapper : IFileSystem
Microsoft.NET.TestFramework (1)
Mock\FileSystemMockBuilder.cs (1)
315private class FileSystemMock : IFileSystem
140 references to IFileSystem
dotnet (33)
BuildServer\BuildServerProvider.cs (2)
14IFileSystem fileSystem = null, 19private readonly IFileSystem _fileSystem = fileSystem ?? FileSystemWrapper.Default;
BuildServer\RazorPidFile.cs (1)
23public static RazorPidFile Read(FilePath path, IFileSystem fileSystem = null)
BuildServer\RazorServer.cs (2)
14IFileSystem fileSystem = null) : IBuildServer 17private readonly IFileSystem _fileSystem = fileSystem ?? FileSystemWrapper.Default;
CommandFactory\CommandResolution\LocalToolsCommandResolver.cs (2)
19IFileSystem fileSystem = null, 24private readonly IFileSystem _fileSystem = fileSystem ?? new FileSystemWrapper();
Commands\Tool\Restore\ToolPackageRestorer.cs (2)
24private readonly IFileSystem _fileSystem; 34IFileSystem? fileSystem = null)
Commands\Tool\Restore\ToolRestoreCommand.cs (2)
25private readonly IFileSystem _fileSystem; 37IFileSystem fileSystem = null,
PerformanceLogEventListener.cs (2)
36internal static PerformanceLogEventListener Create(IFileSystem fileSystem, string logDirectory) 71internal void Initialize(IFileSystem fileSystem, string logDirectory)
PerformanceLogManager.cs (3)
18private readonly IFileSystem _fileSystem; 27internal static void InitializeAndStartCleanup(IFileSystem fileSystem) 54internal PerformanceLogManager(IFileSystem fileSystem)
ShellShim\ShellShimRepository.cs (2)
15IFileSystem fileSystem = null, 20private readonly IFileSystem _fileSystem = fileSystem ?? new FileSystemWrapper();
ToolManifest\ToolManifestEditor.cs (2)
15internal class ToolManifestEditor(IFileSystem fileSystem = null, IDangerousFileDetector dangerousFileDetector = null) : IToolManifestEditor 18private readonly IFileSystem _fileSystem = fileSystem ?? new FileSystemWrapper();
ToolManifest\ToolManifestFinder.cs (2)
15private readonly IFileSystem _fileSystem; 23IFileSystem fileSystem = null,
ToolPackage\LocalToolsResolverCache.cs (2)
18private readonly IFileSystem _fileSystem; 21public LocalToolsResolverCache(IFileSystem fileSystem = null,
ToolPackage\ToolConfigurationDeserializer.cs (1)
20public static ToolConfiguration Deserialize(string pathToXml, IFileSystem fileSystem = null)
ToolPackage\ToolPackageDownloaderBase.cs (2)
23protected readonly IFileSystem _fileSystem; 44IFileSystem? fileSystem = null
ToolPackage\ToolPackageInstance.cs (4)
38private IFileSystem _fileSystem; 48IFileSystem fileSystem = null) 164DirectoryPath assetsJsonParentDirectory, IFileSystem fileSystem) 172private static ToolConfiguration DeserializeToolConfiguration(LockFileTargetLibrary library, DirectoryPath packageDirectory, IFileSystem fileSystem)
ToolPackage\ToolPackageStoreAndQuery.cs (2)
11internal class ToolPackageStoreAndQuery(DirectoryPath root, IFileSystem fileSystem = null) : IToolPackageStoreQuery, IToolPackageStore 17private IFileSystem _fileSystem = fileSystem ?? new FileSystemWrapper();
dotnet.Tests (26)
BuildServerTests\BuildServerProviderTests.cs (3)
85IFileSystem fileSystem = new FileSystemMockBuilder().UseCurrentSystemTemporaryDirectory().Build(); 111IFileSystem fileSystemMock = fileSystemMockBuilder.AddFile( 163var fileSystemMock = new Mock<IFileSystem>();
BuildServerTests\RazorServerTests.cs (3)
31var fileSystemMock = new FileSystemMockBuilder() 70var fileSystemMock = new FileSystemMockBuilder() 104var fileSystemMock = new FileSystemMockBuilder()
CommandFactoryTests\GivenALocalToolsCommandResolver.cs (1)
22private readonly IFileSystem _fileSystem;
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (1)
29private readonly IFileSystem _fileSystem;
CommandTests\Tool\Install\ToolInstallLocalCommandTests.cs (1)
25private readonly IFileSystem _fileSystem;
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (1)
26private readonly IFileSystem _fileSystem;
CommandTests\Tool\Restore\ToolRestoreCommandWithMultipleNugetConfigTests.cs (1)
23private readonly IFileSystem _fileSystem;
CommandTests\Tool\Uninstall\ToolUninstallGlobalOrToolPathCommandTests.cs (1)
24private readonly IFileSystem _fileSystem;
CommandTests\Tool\Uninstall\ToolUninstallLocalCommandTests.cs (1)
20private readonly IFileSystem _fileSystem;
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (1)
25private readonly IFileSystem _fileSystem;
CommandTests\Tool\Update\ToolUpdateLocalCommandTests.cs (1)
26private readonly IFileSystem _fileSystem;
ConfigurerTests\GivenAFirstTimeUseNoticeSentinel.cs (6)
34var fileSystemMock = _fileSystemMockBuilder.Build(); 47var fileSystemMock = _fileSystemMockBuilder.Build(); 60var fileSystemMock = _fileSystemMockBuilder.Build(); 80var fileSystemMock = _fileSystemMockBuilder.Build(); 97var fileSystemMock = _fileSystemMockBuilder.Build(); 115var fileSystemMock = _fileSystemMockBuilder.Build();
ConfigurerTests\GivenAFunctionReturnStringAndFakeFileSystem.cs (1)
17private IFileSystem _fileSystemMock;
ShellShimTests\LinuxEnvironmentPathTests.cs (1)
129IFileSystem fileSystem = new FileSystemMockBuilder().Build();
ShellShimTests\OsxEnvironmentPathTests.cs (1)
129IFileSystem fileSystem = new FileSystemMockBuilder().Build();
ToolManifestTests\ToolManifestEditorTests.cs (1)
16private readonly IFileSystem _fileSystem;
ToolManifestTests\ToolManifestFinderTests.cs (1)
18private readonly IFileSystem _fileSystem;
Microsoft.DotNet.Cli.Utils.Tests (46)
MockFileSystemTests.cs (46)
16IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 29IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 43IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 57IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 72IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 85IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 98IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 110IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 123IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 138IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 151IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 165IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 178IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 193IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 219IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 236IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 252IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 269IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 287IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 303IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 318IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 334IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 351IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 369IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 384IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 401IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 415IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 430IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 448IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 461IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 481IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 496IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 514IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 527IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 551IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 567IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 583IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 597IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 616IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 633IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 655IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 671IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 688IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 705IFileSystem fileSystem = SetupSubjectFileSystem(testMockBehaviorIsInSync); 714private static IFileSystem SetupSubjectFileSystem(bool testMockBehaviorIsInSync) 716IFileSystem fileSystem;
Microsoft.DotNet.Configurer (7)
AspNetCertificateSentinel.cs (2)
14private readonly IFileSystem _fileSystem; 25internal AspNetCertificateSentinel(string dotnetUserProfileFolderPath, IFileSystem fileSystem)
FileSentinel.cs (2)
11private readonly IFileSystem _fileSystem; 18internal FileSentinel(FilePath file, IFileSystem? fileSystem)
FirstTimeUseNoticeSentinel.cs (2)
14private readonly IFileSystem _fileSystem; 25internal FirstTimeUseNoticeSentinel(string dotnetUserProfileFolderPath, IFileSystem fileSystem)
IFileExtensions.cs (1)
11public static void CreateIfNotExists(this IFileSystem fileSystem, string filePath)
Microsoft.DotNet.InternalAbstractions (1)
FileSystemWrapper.cs (1)
8public static IFileSystem Default { get; } = new FileSystemWrapper();
Microsoft.DotNet.PackageInstall.Tests (14)
LocalToolsResolverCacheTests.cs (4)
23IFileSystem fileSystem = new FileSystemMockBuilder().UseCurrentSystemTemporaryDirectory().Build(); 225IFileSystem fileSystem = new FileSystemMockBuilder().UseCurrentSystemTemporaryDirectory().Build(); 277Action<IFileSystem, string, string> corruptCache) 279IFileSystem fileSystem =
NuGetPackageInstallerTests.cs (1)
355private static void WriteNugetConfigFileToPointToTheFeed(IFileSystem fileSystem, FilePath? filePath)
ToolPackageDownloaderTests.cs (5)
827IFileSystem fileSystem, 850private static void AssertInstallRollBack(IFileSystem fileSystem, IToolPackageStore store) 870private (IToolPackageStore, IToolPackageStoreQuery, IToolPackageDownloader, IToolPackageUninstaller, BufferedReporter, IFileSystem, DirectoryPath testDir 880IFileSystem fileSystem; 925private static void WriteNugetConfigFile(IFileSystem fileSystem, FilePath? filePath, bool includeLocalFeedPath)
ToolPackageInstallerNugetCacheTests.cs (2)
117private (IToolPackageStore, IToolPackageDownloader, BufferedReporter, IFileSystem) Setup( 125IFileSystem fileSystem;
ToolPackageUninstallerTests.cs (2)
68private (IToolPackageStore, IToolPackageStoreQuery, IToolPackageDownloader, IToolPackageUninstaller, BufferedReporter, IFileSystem 78IFileSystem fileSystem;
Microsoft.DotNet.Tools.Tests.ComponentMocks (11)
AppHostShellShimMakerMock.cs (2)
14private readonly IFileSystem _fileSystem; 16public AppHostShellShimMakerMock(IFileSystem fileSystem = null)
ToolPackageDownloaderMock.cs (2)
41private readonly IFileSystem _fileSystem; 52IFileSystem fileSystem,
ToolPackageDownloaderMock2.cs (1)
26public ToolPackageDownloaderMock2(IToolPackageStore store, string runtimeJsonPathForTests, string currentWorkingDirectory, IFileSystem fileSystem) : base(store, runtimeJsonPathForTests, currentWorkingDirectory, fileSystem)
ToolPackageMock.cs (2)
18private IFileSystem _fileSystem; 24IFileSystem fileSystem,
ToolPackageStoreMock.cs (2)
16private IFileSystem _fileSystem; 21IFileSystem fileSystem,
ToolPackageUninstallerMock.cs (2)
16private IFileSystem _fileSystem; 18public ToolPackageUninstallerMock(IFileSystem fileSystem,
Microsoft.NET.TestFramework (2)
Mock\FileSystemMockBuilder.cs (2)
18internal static IFileSystem Empty { get; } = Create().Build(); 55internal IFileSystem Build()