Skip to content

why mountfs doesn't provide unmount #538

@davidleon

Description

@davidleon

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions