Implements redirecting-with using an OverlayFileSystem rather than
nesting RedirectingFileSystem -
- "fallthrough": adds the RedirectingFileSystem to OverlayFileSystem
- "fallback": adds the RedirectingFileSystem *before* the previously added one. This is really only useful when its the initial overlay to place it before the RealFileSystem
- "redirect-only": removes any previously added filesystems. Mostly intended to remove the RealFileSystem, but works in the general case as well.
Updates getVFSFromYAML to use this API, as well as any existing uses
of getVFSFromYAML since it's simpler anyway (ie. no need to read the
underlying buffers first). This does come with a slight change in
semantics though - it is no longer possible to "chain" VFS mappings.
Given an overlay with a mapping of A -> B and another with B -> C, A can
no longer map to C. An A ->C mapping must be specified as its own
mapping if this is desired.
The intention of this change is to allow for simplifying
RedirectingFileSystem by removing all the redirecting-with handling
from it. This will allow reverting it back to its original
implementation where it simply performed the mapping and failed if that
mapping did not exist in ExternalFS. That will be completed in a later
commit to allow for an easier migration path if any downstream user
requires the ability to chain mappings.
Depends on D121423