module Gio::Mount

Overview

The #GMount interface represents user-visible mounts. Note, when porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume.

#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. Might or might not be related to a volume object.

Unmounting a #GMount instance is an asynchronous operation. For more information about asynchronous operations, see #GAsyncResult and #GTask. To unmount a #GMount instance, first call g_mount_unmount_with_operation() with (at least) the #GMount instance and a #GAsyncReadyCallback. The callback will be fired when the operation has resolved (either with success or failure), and a #GAsyncResult structure will be passed to the callback. That callback should then call g_mount_unmount_with_operation_finish() with the #GMount and the #GAsyncResult data to see if the operation was completed successfully. If an error is present when g_mount_unmount_with_operation_finish() is called, then it will be filled with any error information.

Defined in:

lib/gi-crystal/src/auto/gio-2.0/mount.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.cast(obj : GObject::Object) : self #

Cast a GObject::Object to self, throws a TypeCastError if the cast can't be made.


[View source]

Class Method Detail

def self.cast?(obj : GObject::Object) : self | Nil #

[View source]
def self.g_type : UInt64 #

[View source]

Instance Method Detail

def can_eject : Bool #

[View source]
def can_unmount : Bool #

[View source]
def changed_signal #

[View source]
def default_location : Gio::File #

[View source]
def drive : Gio::Drive | Nil #

[View source]
def eject(flags : Gio::MountUnmountFlags, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

DEPRECATED


[View source]
def eject_finish(result : Gio::AsyncResult) : Bool #

DEPRECATED


[View source]
def eject_with_operation(flags : Gio::MountUnmountFlags, mount_operation : Gio::MountOperation | Nil, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def eject_with_operation_finish(result : Gio::AsyncResult) : Bool #

[View source]
def guess_content_type(force_rescan : Bool, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def guess_content_type_finish(result : Gio::AsyncResult) : Enumerable(String) #

[View source]
def guess_content_type_sync(force_rescan : Bool, cancellable : Gio::Cancellable | Nil) : Enumerable(String) #

[View source]
def icon : Gio::Icon #

[View source]
def is_shadowed : Bool #

[View source]
def name : String #

[View source]
def pre_unmount_signal #

[View source]
def remount(flags : Gio::MountMountFlags, mount_operation : Gio::MountOperation | Nil, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def remount_finish(result : Gio::AsyncResult) : Bool #

[View source]
def root : Gio::File #

[View source]
def shadow : Nil #

[View source]
def sort_key : String | Nil #

[View source]
def symbolic_icon : Gio::Icon #

[View source]
abstract def to_unsafe #

[View source]
def unmount(flags : Gio::MountUnmountFlags, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

DEPRECATED


[View source]
def unmount_finish(result : Gio::AsyncResult) : Bool #

DEPRECATED


[View source]
def unmount_with_operation(flags : Gio::MountUnmountFlags, mount_operation : Gio::MountOperation | Nil, cancellable : Gio::Cancellable | Nil, callback : Gio::AsyncReadyCallback | Nil, user_data : Pointer(Void) | Nil) : Nil #

[View source]
def unmount_with_operation_finish(result : Gio::AsyncResult) : Bool #

[View source]
def unmounted_signal #

[View source]
def unshadow : Nil #

[View source]
def uuid : String | Nil #

[View source]
def volume : Gio::Volume | Nil #

[View source]