Looking around at some of the Swift Path libraries out there, they're almost all just wrappers around FileManager
, but they seem to only really focus on giving more swifty access to the local file system. (Some do allow you to overwrite the FileManager used though)
You do bring up a good point. There probably should be functionality for testing against virtual file systems.
Perhaps by overwriting the root directory with a virtual one:
Path.root = DirectoryPath("/").virtual