MountImpl

data class MountImpl(val gioMountPointer: <Error class: unknown class><<Error class: unknown class>>) : Mount

The MountImpl type represents a native instance of the Mount interface.

Constructors

Link copied to clipboard
constructor(gioMountPointer: <Error class: unknown class><<Error class: unknown class>>)

Creates a new instance of Mount for the provided CPointer.

Properties

Link copied to clipboard
open override val gioMountPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
abstract val gioProxyPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun canEject(): Boolean

Checks if @mount can be ejected.

Link copied to clipboard
open fun canUnmount(): Boolean

Checks if @mount can be unmounted.

Link copied to clipboard
open fun connect(connection: IoStream, proxyAddress: ProxyAddress, cancellable: Cancellable? = null): <Error class: unknown class><IoStream>

Given @connection to communicate with a proxy (eg, a #GSocketConnection that is connected to the proxy server), this does the necessary handshake to connect to @proxy_address, and if required, wraps the #GIOStream to handle proxy payload.

Link copied to clipboard
open fun connectAsync(connection: IoStream, proxyAddress: ProxyAddress, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Asynchronous version of g_proxy_connect().

Link copied to clipboard
open fun connectFinish(result: AsyncResult): <Error class: unknown class><IoStream>

See g_proxy_connect().

Link copied to clipboard
open fun eject(flags: MountUnmountFlags, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_finish() with the @mount and #GAsyncResult data returned in the @callback.

Link copied to clipboard
open fun ejectFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes ejecting a mount. If any errors occurred during the operation,

Link copied to clipboard
open fun ejectWithOperation(flags: MountUnmountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback.

Link copied to clipboard
open fun ejectWithOperationFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes ejecting a mount. If any errors occurred during the operation,

Link copied to clipboard

Gets the default location of @mount. The default location of the given

Link copied to clipboard
open fun getDrive(): Drive?

Gets the drive for the @mount.

Link copied to clipboard
open fun getIcon(): Icon

Gets the icon for @mount.

Link copied to clipboard
open fun getName(): String

Gets the name of @mount.

Link copied to clipboard
open fun getRoot(): File

Gets the root directory on @mount.

Link copied to clipboard
open fun getSortKey(): String?

Gets the sort key for @mount, if any.

Link copied to clipboard
open fun getSymbolicIcon(): Icon

Gets the symbolic icon for @mount.

Link copied to clipboard
open fun getUuid(): String?

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 null if there is no UUID available.

Link copied to clipboard
open fun getVolume(): Volume?

Gets the volume for the @mount.

Link copied to clipboard
open fun guessContentType(forceRescan: Boolean, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

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.

Link copied to clipboard
open fun guessContentTypeFinish(result: AsyncResult): <Error class: unknown class><List<String>>

Finishes guessing content types of @mount. If any errors occurred during the operation, @error will be set to contain the errors and false will be returned. In particular, you may get an %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content guessing.

Link copied to clipboard
open fun guessContentTypeSync(forceRescan: Boolean, cancellable: Cancellable? = null): <Error class: unknown class><List<String>>

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.

Link copied to clipboard
open fun isShadowed(): Boolean

Determines if @mount is shadowed. Applications or libraries should avoid displaying @mount in the user interface if it is shadowed.

Link copied to clipboard
open fun onChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the mount has been changed.

Link copied to clipboard
open fun onPreUnmount(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

This signal may be emitted when the #GMount is about to be unmounted.

Link copied to clipboard
open fun onUnmounted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

This signal is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.

Link copied to clipboard
open fun remount(flags: MountMountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Remounts a mount. This is an asynchronous operation, and is finished by calling g_mount_remount_finish() with the @mount and #GAsyncResults data returned in the @callback.

Link copied to clipboard
open fun remountFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes remounting a mount. If any errors occurred during the operation,

Link copied to clipboard
open fun shadow()

Increments the shadow count on @mount. Usually used by #GVolumeMonitor implementations when creating a shadow mount for

Link copied to clipboard

Some proxy protocols expect to be passed a hostname, which they will resolve to an IP address themselves. Others, like SOCKS4, do not allow this. This function will return false if @proxy is implementing such a protocol. When false is returned, the caller should resolve the destination hostname first, and then pass a #GProxyAddress containing the stringified IP address to g_proxy_connect() or g_proxy_connect_async().

Link copied to clipboard
open fun unmount(flags: MountUnmountFlags, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_finish() with the @mount and #GAsyncResult data returned in the @callback.

Link copied to clipboard
open fun unmountFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes unmounting a mount. If any errors occurred during the operation,

Link copied to clipboard
open fun unmountWithOperation(flags: MountUnmountFlags, mountOperation: MountOperation? = null, cancellable: Cancellable? = null, callback: AsyncReadyCallback?)

Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback.

Link copied to clipboard
open fun unmountWithOperationFinish(result: AsyncResult): <Error class: unknown class><Boolean>

Finishes unmounting a mount. If any errors occurred during the operation,

Link copied to clipboard
open fun unshadow()

Decrements the shadow count on @mount. Usually used by #GVolumeMonitor implementations when destroying a shadow mount for