Closed pmacn closed 10 years ago
So FileFacade
maps to the static System.IO.File
methods. Following that pattern, this should probably be DirectoryFacade
no?
If the intent of IFileFacade
is to wrap the System.IO.File
methods then I agree that an IDirectoryFacade
should exist, but I'm not sure this shouldn't exist as well.
So rather then being a wrapper this would be an attempt at making a better abstraction (eventually) for basic get, create, delete interaction with files and directories. Setting things like reading/writing files and manipulating directories aside for other interfaces.
Seems legit. I think I need to rename the other classes then. They're not really "facades" in the same way this would be.
Needed an injectable/testable way to get
IDirectoryInfo
objects from paths. Figured I would propose adding this here as I'm sure there are other people who might need it. Or at least as an attempt to start a discussion on changes needed to make it fit.This is by no means a complete example of what a
IFileSystemFacade
might look like but it's got the methods that I needed at the moment plus a few overloads for great good.