System.IO.Abstractions icon indicating copy to clipboard operation
System.IO.Abstractions copied to clipboard

Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!

Results 53 System.IO.Abstractions issues
Sort by recently updated
recently updated
newest added

**Describe the solution you'd like** I'd like to be able to observe common/interesting events (from a testing perspective) that happen into a `MockFileSystem`. Why? I'm creating a cache service that...

type: enhancement
state: ready to pick
area: testinghelpers

Cannot run with System.IO.Abstractions latest version **To Reproduce** Create an Azure Functions project for .NET 6. Run it. Note the runtime error: ``` [2021-11-19T02:33:26.035Z] Could not load file or assembly...

type: bug
state: needs discussion

https://github.com/TestableIO/System.IO.Abstractions/blob/05486f75815bd2f22beefa48407a42cb18034a72/src/System.IO.Abstractions.TestingHelpers/MockFileStream.cs#L93-L107 If Thread1 invokes this method, but Thread2 deletes the same file while Thread1 is at line 96, then Thread1 will throw a NullReferenceException at line 107. I'm not sure...

type: bug
state: ready to pick
area: testinghelpers

**Is your feature request related to a problem? Please describe.** I am trying to implement a static site generator, and one of the tasks I need to do is adjust...

type: enhancement
state: ready
area: testinghelpers

**Describe the bug** When performing a `File.OpenWrite()`, followed by `File.Delete()` the current implementation executes this without giving any indication anything is wrong. even if attampting to perform a `filestream.Flush()` operation...

type: bug
state: ready to pick
area: testinghelpers

**Describe the bug** MockDirectory.Delete recursive does not consider nested files which MockFileData.AllowedFileShare property does not allow delete operation. **To Reproduce** The following test reproduces the error: [Test] public void MockDirectory_Delete_ShouldThrowIfFileAccessShareHasNoWriteOrDeleteAccess()...

type: bug
state: ready to pick
area: testinghelpers

**Describe the bug** On windows, when using `MockFileSystem().Path.GetRelativePath` and the `relativeTo` path does not have a drive specified, the result is inconsistent depending on what drive you run the code...

type: bug
state: ready
area: testinghelpers

**Describe the bug** After calling `MockFileSystem.AddFile(string, MockFileData)` using a path that includes a directory ending in a period, `MockFileSystem.Directory.Exists(string)` will return false when called against the directory containing that file...

type: bug
state: ready to pick
area: testinghelpers

When calling Directory.EnumerateFiles on MockFileSystem, incorrect matching occurs, that differs from the real FileSystem. Mock FileSystem ``` var results = Directory.EnumerateFiles(@"c:\jobfolder\result.rreq.001.afd", "*.rreq.*.*.*"); // results has no entries ``` Real FileSystem...

type: bug
state: needs discussion
area: testinghelpers
state: stale

**Describe the bug** See #652 . I see more problems in the future with the following settings in: * MatchType = MatchType.Win32, * IgnoreInaccessible * ReturnSpecialDirectories * AttributesToSkip * MatchCasing...

type: enhancement
state: ready to pick
area: testinghelpers