-
Notifications
You must be signed in to change notification settings - Fork 267
Added IFileSystemWatcher, IFile and IDirectory interfaces #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Do not throw exception when calling DirectoryInfoWrapper.Parent for the root directory (TestableIO#430) by @wexman - Fix MockDirectoryInfo GetFiles for UNC paths caused by bug in StringExtensions.NormalizeSlashes (TestableIO#422) by @DeveloperGuo - Pass IFileSystem into FileWrapper instead of FileSystem to allow replacement file systems to be used (TestableIO#432) by @kirbatious - Make sure FileNotFound exceptions contain path and proper message (TestableIO#427) by @fgreinacher - Do not delete directories that start with the same path (TestableIO#433) by @updateaman
|
That might indeed be a breaking change, but a rather theoretical one, meaning it won't actually break because the interfaces have the same members as the abstract classes... |
System.IO.Abstractions/IDirectory.cs
Outdated
| DirectoryInfoBase CreateDirectory(string path, DirectorySecurity directorySecurity); | ||
| string[] GetLogicalDrives(); | ||
| #endif | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: extra newline here
|
I also agree with the direction that #175 wants to go, how difficult do you think the breaking changes would be for people consuming the library to fix in their solutions @fgreinacher? If you're using the For instances where there are breaking changes (explicitly typed local variables, function parameters, function return type, etc, is a simple replace of If that's the case then I don't think we should be too worried about this breaking change. |
|
BTW, do you have any idea why the comments from my previous pull request show up here? Did i do something wrong? |
(I assume comments == commits) That's just happening because we are updating your branch from |
|
OK - let's do this. A couple of things that I'd ask you to do:
|
|
Oh, ok. But if we're going that route anyway, maybe we should do the same for all other cases as well? For example, IPath instead of PathBase, IFileInfo instead of FileInfoBase, IDirectoryInfo instead of DirectoryInfoBase and so on? |
|
@wexman Yes I think it definitely makes sense to have a consistent API |
…h and changed source accordingly
…ions # Conflicts: # version.json
|
Ok, it's done... |
|
Merged with some adaptions. Thanks a lot for your work @wexman! |
I have added the IFileSystemWatcher, IFile and IDirectory interface for easier mocking...