Ejemplo n.º 1
0
def unmount(drive):
    """Unmount the given drive.

    This function unmounts the dokan drive mounted at the given drive letter.
    It works but may leave dangling processes; its better to use the "unmount"
    method on the MountProcess class if you have one.
    """
    if not libdokan.DokanUnmount(drive):
        raise OSError("filesystem could not be unmounted: %s" % (drive,))
Ejemplo n.º 2
0
 def unmount(self):
     """Cleanly unmount the Dokan filesystem, terminating this subprocess."""
     if not libdokan.DokanUnmount(self.drive):
         raise OSError("the filesystem could not be unmounted: %s" %
                       (self.drive, ))
     self.terminate()