Add OverlayFS implementation to replace 3rd party one
- There's a number of bugs with the original 3rd party implementation.
- We need to keep track of deleted directories to avoid issues like this one.
- We separate OverlayFS from OverlayFSImpl. The impl uses promises and is easier to maintain. It implements the business logic without actually adhering to the expected interface.
Screenshots
Before (on main ) |
After (this MR) |
---|---|
20221126_before | 20221126_after |
How to review
- The main files being added are
OverlayFS.ts
andOverlayFSImpl.ts
. These are inspired off of the original BrowserFS implementation, but fix some fundamental issues. -
OverlayFS.ts
maps the underlying business logic (implemented inOverlayFSImpl.ts
) to the interfaces and subclasses that BrowserFS expects. This module does not contain business logic itself. It's main responsibility is mapping the implementation to the BrowserFS interfaces (so that the implementation doesn't have to use BrowserFS's cumbersome interface). -
OverlayFSImpl.ts
implements the actual OverlayFS strategy. Checkout the class description for details. Each method also contains a link to the original implementation. In some cases the method might deviate a bit (particularly when we need to touch or read from the.deletedFiles.log
), which is intentional to fix issues with the original implementation. - Consider reviewing the tests first.
Edited by Paul Slaughter