For now most are implemented by printing out the name of the filesystem,
but this can be expanded in the future. Only OverlayFileSystem and
RedirectingFileSystem are properly implemented in this patch.
- OverlayFileSystem: Prints each filesystem in the order that any operations are actually run on them. Optionally prints recursively.
- RedirectingFileSystem: Prints out all mappings, as well as the ExternalFS. Most of this was already implemented other than the handling for the DirectoryRemap case and to actually print out the mapping.
Each FS should implement printImpl rather than print, where the
latter just fowards to the former. This is to avoid spreading the
default arguments through to the subclasses (where we may miss updating
in the future).
Usually, the dump that takes a raw_ostream is called print(). Can we follow that here too?
I also think it'd be useful to have it take a second argument for whether to print recursively. A bit awkward with virtual functions, but you can make it work nicely with indirection: