New interfaces, future-proofing and CoreFX


I considered adding a suggestion to have IFileInfo/IDirectoryInfo etc in the Core Framework — this would be very useful for mocking. In fact there are a few libraries that exist only to provide interfaces/adapters, including one in ASP.NET vNext (

However this would effectively block any future additions to those APIs, as new properties/methods on an interface would be a breaking change.

Is it a good idea to unseal those types and make all methods virtual? Is there a better solution?


There’s a related discussion about FileSystem APIs on GitHub:

.NET Foundation Website | Blog | Projects | Code of Conduct