:right-sidebar: True Mount =================================================================== .. currentmodule:: gi.repository.Gio .. class:: Mount(*args, **kwargs) :no-contents-entry: The ``GMount`` interface represents a user-visible mount, such as a mounted file system. ``GMount`` is a ‘mounted’ filesystem that you can access. Mounted is in quotes because it’s not the same as a UNIX mount, it might be a GVFS mount, but you can still access the files on it if you use GIO. A ``GMount`` might be associated with a :obj:`~gi.repository.Gio.Volume` (such as a USB flash drive) which hosts it. Unmounting a ``GMount`` instance is an asynchronous operation. For more information about asynchronous operations, see :obj:`~gi.repository.Gio.AsyncResult` and :obj:`~gi.repository.Gio.Task`\. To unmount a ``GMount`` instance, first call :obj:`~gi.repository.Gio.Mount.unmount_with_operation` with (at least) the ``GMount`` instance and a :obj:`~gi.repository.Gio.AsyncReadyCallback`\. The callback will be fired when the operation has resolved (either with success or failure), and a :obj:`~gi.repository.Gio.AsyncResult` structure will be passed to the callback. That callback should then call :obj:`~gi.repository.Gio.Mount.unmount_with_operation_finish` with the ``GMount`` and the :obj:`~gi.repository.Gio.AsyncResult` data to see if the operation was completed successfully. If an ``error`` is present when :obj:`~gi.repository.Gio.Mount.unmount_with_operation_finish` is called, then it will be filled with any error information. Note, when `porting from GnomeVFS `__\, ``GMount`` is the moral equivalent of ``GnomeVFSVolume``\. Methods ------- .. rst-class:: interim-class .. class:: Mount :no-index: .. method:: can_eject() -> bool Checks if ``mount`` can be ejected. .. method:: can_unmount() -> bool Checks if ``mount`` can be unmounted. .. method:: eject(flags: ~gi.repository.Gio.MountUnmountFlags, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Ejects a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.eject_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.eject_with_operation` instead. :param flags: flags affecting the unmount if required for eject :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: eject_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes ejecting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.eject_with_operation_finish` instead. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: eject_with_operation(flags: ~gi.repository.Gio.MountUnmountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Ejects a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.eject_with_operation_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.22 :param flags: flags affecting the unmount if required for eject :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: eject_with_operation_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes ejecting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. versionadded:: 2.22 :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: get_default_location() -> ~gi.repository.Gio.File Gets the default location of ``mount``\. The default location of the given ``mount`` is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume). .. method:: get_drive() -> ~gi.repository.Gio.Drive | None Gets the drive for the ``mount``\. This is a convenience method for getting the :obj:`~gi.repository.Gio.Volume` and then using that object to get the :obj:`~gi.repository.Gio.Drive`\. .. method:: get_icon() -> ~gi.repository.Gio.Icon Gets the icon for ``mount``\. .. method:: get_name() -> str Gets the name of ``mount``\. .. method:: get_root() -> ~gi.repository.Gio.File Gets the root directory on ``mount``\. .. method:: get_sort_key() -> str | None Gets the sort key for ``mount``\, if any. .. versionadded:: 2.32 .. method:: get_symbolic_icon() -> ~gi.repository.Gio.Icon Gets the symbolic icon for ``mount``\. .. versionadded:: 2.34 .. method:: get_uuid() -> str | None Gets the UUID for the ``mount``\. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns :const:`None` if there is no UUID available. .. method:: get_volume() -> ~gi.repository.Gio.Volume | None Gets the volume for the ``mount``\. .. method:: guess_content_type(force_rescan: bool, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Tries to guess the type of content stored on ``mount``\. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the `shared-mime-info `__ specification for more on x-content types. This is an asynchronous operation (see :func:`~gi.repository.Gio.Mount.guess_content_type_sync` for the synchronous version), and is finished by calling :func:`~gi.repository.Gio.Mount.guess_content_type_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.18 :param force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` :param user_data: user data passed to ``callback`` .. method:: guess_content_type_finish(result: ~gi.repository.Gio.AsyncResult) -> list[str] Finishes guessing content types of ``mount``\. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. In particular, you may get an :const:`~gi.repository.Gio.IOErrorEnum.NOT_SUPPORTED` if the mount does not support content guessing. .. versionadded:: 2.18 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: guess_content_type_sync(force_rescan: bool, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> list[str] Tries to guess the type of content stored on ``mount``\. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the `shared-mime-info `__ specification for more on x-content types. This is a synchronous operation and as such may block doing IO; see :func:`~gi.repository.Gio.Mount.guess_content_type` for the asynchronous version. .. versionadded:: 2.18 :param force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore .. method:: is_shadowed() -> bool Determines if ``mount`` is shadowed. Applications or libraries should avoid displaying ``mount`` in the user interface if it is shadowed. A mount is said to be shadowed if there exists one or more user visible objects (currently :obj:`~gi.repository.Gio.Mount` objects) with a root that is inside the root of ``mount``\. One application of shadow mounts is when exposing a single file system that is used to address several logical volumes. In this situation, a :obj:`~gi.repository.Gio.VolumeMonitor` implementation would create two :obj:`~gi.repository.Gio.Volume` objects (for example, one for the camera functionality of the device and one for a SD card reader on the device) with activation URIs ``gphoto2://[usb:001,002]/store1/`` and ``gphoto2://[usb:001,002]/store2/``\. When the underlying mount (with root ``gphoto2://[usb:001,002]/``\) is mounted, said :obj:`~gi.repository.Gio.VolumeMonitor` implementation would create two :obj:`~gi.repository.Gio.Mount` objects (each with their root matching the corresponding volume activation root) that would shadow the original mount. The proxy monitor in GVfs 2.26 and later, automatically creates and manage shadow mounts (and shadows the underlying mount) if the activation root on a :obj:`~gi.repository.Gio.Volume` is set. .. versionadded:: 2.20 .. method:: remount(flags: ~gi.repository.Gio.MountMountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Remounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.remount_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted. :param flags: flags affecting the operation :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: remount_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes remounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: shadow() -> None Increments the shadow count on ``mount``\. Usually used by :obj:`~gi.repository.Gio.VolumeMonitor` implementations when creating a shadow mount for ``mount``\, see :func:`~gi.repository.Gio.Mount.is_shadowed` for more information. The caller will need to emit the :obj:`~gi.repository.Gio.Mount`\::changed signal on ``mount`` manually. .. versionadded:: 2.20 .. method:: unmount(flags: ~gi.repository.Gio.MountUnmountFlags, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Unmounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.unmount_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.unmount_with_operation` instead. :param flags: flags affecting the operation :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: unmount_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes unmounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.unmount_with_operation_finish` instead. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: unmount_with_operation(flags: ~gi.repository.Gio.MountUnmountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Unmounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.unmount_with_operation_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.22 :param flags: flags affecting the operation :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: unmount_with_operation_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes unmounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. versionadded:: 2.22 :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: unshadow() -> None Decrements the shadow count on ``mount``\. Usually used by :obj:`~gi.repository.Gio.VolumeMonitor` implementations when destroying a shadow mount for ``mount``\, see :func:`~gi.repository.Gio.Mount.is_shadowed` for more information. The caller will need to emit the :obj:`~gi.repository.Gio.Mount`\::changed signal on ``mount`` manually. .. versionadded:: 2.20 Signals ------- .. rst-class:: interim-class .. class:: Mount.signals :no-index: .. method:: changed() -> None The type of the None singleton. .. method:: pre_unmount() -> None The type of the None singleton. .. versionadded:: 2.22 .. method:: unmounted() -> None The type of the None singleton. Virtual Methods --------------- .. rst-class:: interim-class .. class:: Mount :no-index: .. method:: do_can_eject() -> bool Checks if ``mount`` can be ejected. .. method:: do_can_unmount() -> bool Checks if ``mount`` can be unmounted. .. method:: do_changed() -> None The type of the None singleton. .. method:: do_eject(flags: ~gi.repository.Gio.MountUnmountFlags, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Ejects a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.eject_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.eject_with_operation` instead. :param flags: flags affecting the unmount if required for eject :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: do_eject_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes ejecting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.eject_with_operation_finish` instead. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_eject_with_operation(flags: ~gi.repository.Gio.MountUnmountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Ejects a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.eject_with_operation_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.22 :param flags: flags affecting the unmount if required for eject :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: do_eject_with_operation_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes ejecting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. versionadded:: 2.22 :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_get_default_location() -> ~gi.repository.Gio.File Gets the default location of ``mount``\. The default location of the given ``mount`` is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume). .. method:: do_get_drive() -> ~gi.repository.Gio.Drive | None Gets the drive for the ``mount``\. This is a convenience method for getting the :obj:`~gi.repository.Gio.Volume` and then using that object to get the :obj:`~gi.repository.Gio.Drive`\. .. method:: do_get_icon() -> ~gi.repository.Gio.Icon Gets the icon for ``mount``\. .. method:: do_get_name() -> str Gets the name of ``mount``\. .. method:: do_get_root() -> ~gi.repository.Gio.File Gets the root directory on ``mount``\. .. method:: do_get_sort_key() -> str | None Gets the sort key for ``mount``\, if any. .. versionadded:: 2.32 .. method:: do_get_symbolic_icon() -> ~gi.repository.Gio.Icon Gets the symbolic icon for ``mount``\. .. versionadded:: 2.34 .. method:: do_get_uuid() -> str | None Gets the UUID for the ``mount``\. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns :const:`None` if there is no UUID available. .. method:: do_get_volume() -> ~gi.repository.Gio.Volume | None Gets the volume for the ``mount``\. .. method:: do_guess_content_type(force_rescan: bool, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Tries to guess the type of content stored on ``mount``\. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the `shared-mime-info `__ specification for more on x-content types. This is an asynchronous operation (see :func:`~gi.repository.Gio.Mount.guess_content_type_sync` for the synchronous version), and is finished by calling :func:`~gi.repository.Gio.Mount.guess_content_type_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.18 :param force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` :param user_data: user data passed to ``callback`` .. method:: do_guess_content_type_finish(result: ~gi.repository.Gio.AsyncResult) -> list[str] Finishes guessing content types of ``mount``\. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. In particular, you may get an :const:`~gi.repository.Gio.IOErrorEnum.NOT_SUPPORTED` if the mount does not support content guessing. .. versionadded:: 2.18 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: do_guess_content_type_sync(force_rescan: bool, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> list[str] Tries to guess the type of content stored on ``mount``\. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the `shared-mime-info `__ specification for more on x-content types. This is a synchronous operation and as such may block doing IO; see :func:`~gi.repository.Gio.Mount.guess_content_type` for the asynchronous version. .. versionadded:: 2.18 :param force_rescan: Whether to force a rescan of the content. Otherwise a cached result will be used if available :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore .. method:: do_pre_unmount() -> None The type of the None singleton. .. method:: do_remount(flags: ~gi.repository.Gio.MountMountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Remounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.remount_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted. :param flags: flags affecting the operation :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: do_remount_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes remounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_unmount(flags: ~gi.repository.Gio.MountUnmountFlags, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Unmounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.unmount_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.unmount_with_operation` instead. :param flags: flags affecting the operation :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: do_unmount_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes unmounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. deprecated:: 2.22 Use :func:`~gi.repository.Gio.Mount.unmount_with_operation_finish` instead. :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_unmount_with_operation(flags: ~gi.repository.Gio.MountUnmountFlags, mount_operation: ~gi.repository.Gio.MountOperation | None = None, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[~gi.repository.GObject.Object | None, ~gi.repository.Gio.AsyncResult, ~typing.Any], None] | None = None, user_data: ~typing.Any = None) -> None Unmounts a mount. This is an asynchronous operation, and is finished by calling :func:`~gi.repository.Gio.Mount.unmount_with_operation_finish` with the ``mount`` and :obj:`~gi.repository.Gio.AsyncResult` data returned in the ``callback``\. .. versionadded:: 2.22 :param flags: flags affecting the operation :param mount_operation: a :obj:`~gi.repository.Gio.MountOperation` or :const:`None` to avoid user interaction. :param cancellable: optional :obj:`~gi.repository.Gio.Cancellable` object, :const:`None` to ignore. :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback`\, or :const:`None`. :param user_data: user data passed to ``callback``\. .. method:: do_unmount_with_operation_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finishes unmounting a mount. If any errors occurred during the operation, ``error`` will be set to contain the errors and :const:`False` will be returned. .. versionadded:: 2.22 :param result: a :obj:`~gi.repository.Gio.AsyncResult`\. .. method:: do_unmounted() -> None The type of the None singleton.