pyfilesystem2 icon indicating copy to clipboard operation
pyfilesystem2 copied to clipboard

why mountfs doesn't provide unmount

Open davidleon opened this issue 3 years ago • 1 comments

don't know the design choice here, why the underlying mounts var is not implemented as a dict?(performance issue? considering mount points are relatively small list. i think it's better to clarify in the source code.)

the following is my implementation for the current implementation.

def umount(self, path):
    _path = forcedir(abspath(normpath(path)))
    for mount_path, fs in self.mounts:
        if _path.startswith(mount_path):
            self.mounts.remove((mount_path,fs))

davidleon avatar May 10 '22 03:05 davidleon

See #487 which I need to take a second look at, at some point :slightly_smiling_face:

lurch avatar May 10 '22 07:05 lurch