Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
New
Description
Currently, mockfilesystems wrap a path with "new FilterPath". but this "wrapping" logic is scattered everywhere in the code (and tests!). And it is hardcoded at filterpath (subclassing is not possible).
This makes it impossible for a mock filesystem to extend FilterPath with some custom logic (example: check for special windows reserved characters).
I don't think code/tests should be calling "new FilterPath" everywhere, this is also just messy. Instead they should ask the mockfilesystem's provider to wrap the path: provider.wrapPath(path, filesystem).
This way, WindowsFS can then override wrapPath() with a subclass that looks for special characters.
This issue is just for the API refactoring/cleanup. Additional Windows-simulation can happen on the parent issue.
Attachments
Issue Links
- links to