Closed Rohansi closed 6 years ago
Alright, I made it like AggregateFileSystem
where it grabs a copy only once so it wont lock for long.
Actually, the behavior here might be a bit off with regards to NextFileSystem
. For MountFileSystem
we want it to only be used when a mount is not matched. How should this work?
If I mount a filesystem to /x/y
and the next filesystem also has /x
will listing /x
show both? But if both have /x/y
it will only show the mount's copy?
Actually, the behavior here might be a bit off with regards to NextFileSystem. For MountFileSystem we want it to only be used when a mount is not matched. How should this work?
Yeah, that's why it was a single directory at the beginning... 😅 but it was indeed making mount points less interesting.
Ideally, it should work like aggregate on these. A mount point is merged on top of what the NextFileSystem provides.
If I mount a filesystem to /x/y and the next filesystem also has /x will listing /x show both? But if both have /x/y it will only show the mount's copy?
So it should be yes and yes.
Alright so the other methods need to be updated to behave like that as well. Right now they just look for whichever mount name is the best match and forwards to that filesystem, but I changed enumerate here to merge them like aggregate does.
So how should writing work? Should new files be created in whichever filesystem is the best match? Reading would just need to look around for the existing file.
I believe that's all now. Mount points essentially override paths in the NextFileSystem without any aggregating between the filesystems.
Also make DirectoryExists return true when the path is part of a mount name, which allows the use of DirectoryEntry on those paths.