This is quite good. Clearly defines what it means to write maintainable code. I'd love to see how it would have handled FileInfo.IsDir() although it could be taken care of with fstest.
Thanks! I'm glad you got something useful out of it. I haven't tried it, but in theory it should work with FileInfo.isDir() the same way, as long as the mock matches the function signature. But, to your point, I've been using fstest to create a mock file system whenever I have file calls that I have to test.