System.IO.Abstractions
System.IO.Abstractions copied to clipboard
Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!
Added draft implementation of a `FileStream`-like class It is not plumbed in at all because I want to discuss the approach first. @fgreinacher is this kind of what you were...
**Is your feature request related to a problem? Please describe.** Long paths in windows >260characters cause issues. The underlying System.IO.File use Win32 APIs that fail to handle >260 cahracters properly....
**Describe the bug** Mock file system is not storing LastAccessTime & LastWriteTime properties for directories **To Reproduce** ``` var fileSystem = new MockFileSystem(); var info = fileSystem.DirectoryInfo.FromDirectoryName(@"C:\\Parent\\Dir"); info.Create(); info.LastWriteTime =...
I'm working on porting an app from running directly on a web server to Azure App Services. As part of this, I need to move the filesystem access that my...
**Describe the bug** I need to write a test for some logic that checks if there is enough space available on disk. **To Reproduce** ##### logic to test ```csharp private...
The windows method for Directory.GetFileSystemEntries supports a parameter SearchOption to return not only values of the top most entries, but also the possibility to search within all sub directories. However,...
**Describe the bug** Calling `MockFileSystem.Directory.GetDirectories(@"some\path")` returns absolute paths instead of relative paths **To Reproduce** In this code ```c# var mockFs = new MockFileSystem(); mockFs.Directory.CreateDirectory(@"foo\bar"); var output = mockFs.Directory.GetDirectories("foo"); ``` `output`...
**Describe the bug** The `IFile.Create()` method returns a `Stream`, but the "original" `File.Create()` returns a `FileStream`. This is important, because the `FileStream` contains the `Name`-property with the files name. **Expected...
**Describe the bug** In a unit test which consists on moving directory using the MoveTo function from IDirectoryInfo doesn't update the IDirectoryInfo entries and the moved directory info keeps the...
**Describe the bug** Including a Root drive/directory in a MockFileSystem causes ArgumentNullException at line 82 of MockFileSystem.cs **To Reproduce** To recreate, execute the following line of code: ```csharp var fileSystem...