public CurrentDirectoryManager([NotNull] VolumeContainer container) { Guard.NotNull(container, nameof(container)); this.container = container; ICollection <VolumeEntry> drives = container.FilterDrives(); AssertFileSystemContainsDrives(drives); VolumeEntry drive = drives.First(); path = new AbsolutePath(drive.Name); }
internal FakeFileSystem([NotNull] VolumeContainer container, [NotNull] string tempDirectory, [NotNull] WaitIndicator copyWaitIndicator) { Guard.NotNull(container, nameof(container)); Guard.NotNull(copyWaitIndicator, nameof(copyWaitIndicator)); this.container = container; TempDirectory = tempDirectory; CopyWaitIndicator = copyWaitIndicator; File = new FileOperationLocker <FakeFile>(container.FileSystemLock, new FakeFile(container, this)); Directory = new DirectoryOperationLocker <FakeDirectory>(container.FileSystemLock, new FakeDirectory(container, this)); Drive = new DriveOperationLocker <FakeDrive>(container.FileSystemLock, new FakeDrive(container, this)); Path = new PathOperationLocker <FakePath>(container.FileSystemLock, new FakePath(container, this)); CurrentDirectoryManager = new CurrentDirectoryManager(container); relativePathConverter = new RelativePathConverter(CurrentDirectoryManager); RandomNumberGenerator = CreateRandomNumberGenerator(container.SystemClock); }
internal FakeDirectoryInfo([NotNull] VolumeContainer container, [NotNull] FakeFileSystem owner, [NotNull] AbsolutePath path, [CanBeNull] string displayPath) : base(container, owner, path, displayPath) { }
protected FakeOperationHandler([NotNull] VolumeContainer container) { Guard.NotNull(container, nameof(container)); Container = container; }