At the core of the library is IFileSystem and FileSystem. Instead of calling methods like File.ReadAllText directly, use IFileSystem.File.ReadAllText. We have exactly the same API, except that ours is injectable and testable. The library also ships with a series of test helpers to save you from having to mock out every call, for basic scenarios. They are not a complete copy of a real-life file system, but they'll get you most of the way there. We even support casting from the .NET Framework's untestable types to our testable wrappers. Since version 4.0 the top-level APIs expose interfaces instead of abstract base classes (these still exist, though), allowing you to completely mock the file system.

Features

  • The library also ships with a series of test helpers to save you from having to mock out every call
  • We even support casting from the .NET Framework's untestable types to our testable wrappers
  • Since version 4.0 the top-level APIs expose interfaces instead of abstract base classes
  • Completely mock the file system
  • Provides examples

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow System.IO.Abstractions

System.IO.Abstractions Web Site

Other Useful Business Software
AI-generated apps that pass security review Icon
AI-generated apps that pass security review

Stop waiting on engineering. Build production-ready internal tools with AI—on your company data, in your cloud.

Retool lets you generate dashboards, admin panels, and workflows directly on your data. Type something like “Build me a revenue dashboard on my Stripe data” and get a working app with security, permissions, and compliance built in from day one. Whether on our cloud or self-hosted, create the internal software your team needs without compromising enterprise standards or control.
Try Retool free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of System.IO.Abstractions!

Additional Project Details

Programming Language

C#

Related Categories

C# Software Development Software

Registered

2022-09-19