Module: Gio
- Defined in:
- lib/gio2/file.rb,
lib/gio2.rb,
lib/gio2/icon.rb,
lib/gio2/action.rb,
lib/gio2/loader.rb,
lib/gio2/volume.rb,
lib/gio2/settings.rb,
lib/gio2/menu-item.rb,
lib/gio2/resources.rb,
lib/gio2/action-map.rb,
lib/gio2/bytes-icon.rb,
lib/gio2/deprecated.rb,
lib/gio2/list-model.rb,
lib/gio2/content-type.rb,
lib/gio2/inet-address.rb,
lib/gio2/input-stream.rb,
lib/gio2/output-stream.rb,
lib/gio2/ruby-seekable.rb,
lib/gio2/simple-action.rb,
lib/gio2/ruby-input-stream.rb,
lib/gio2/ruby-output-stream.rb,
lib/gio2/pollable-input-stream.rb,
lib/gio2/pollable-output-stream.rb,
lib/gio2/settings-schema-source.rb,
lib/gio2/application-command-line.rb
Overview
Copyright (C) 2015 Ruby-GNOME2 Project Team
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Defined Under Namespace
Modules: Action, ActionGroup, ActionMap, AppInfo, AppInfoCreateFlags, ApplicationFlags, AskPasswordFlags, AsyncInitable, AsyncResult, BusNameOwnerFlags, BusNameWatcherFlags, BusType, Converter, ConverterFlags, ConverterResult, CredentialsType, DBusCallFlags, DBusCapabilityFlags, DBusConnectionFlags, DBusError, DBusInterface, DBusInterfaceSkeletonFlags, DBusMessageByteOrder, DBusMessageFlags, DBusMessageHeaderField, DBusMessageType, DBusObject, DBusObjectManager, DBusObjectManagerClientFlags, DBusPropertyInfoFlags, DBusProxyFlags, DBusSendMessageFlags, DBusServerFlags, DBusSignalFlags, DBusSubtreeFlags, DataStreamByteOrder, DataStreamNewlineType, DatagramBased, DebugController, DesktopAppInfoLookup, Drive, DriveStartFlags, DriveStartStopType, DtlsClientConnection, DtlsConnection, DtlsServerConnection, EmblemOrigin, File, FileAttributeInfoFlags, FileAttributeStatus, FileAttributeType, FileCopyFlags, FileCreateFlags, FileDescriptorBased, FileMeasureFlags, FileMonitorEvent, FileMonitorFlags, FileQueryInfoFlags, FileType, FilesystemPreviewType, IOErrorEnum, IOModuleScopeFlags, IOStreamSpliceFlags, Icon, Initable, ListModel, LoadableIcon, MemoryMonitor, MemoryMonitorWarningLevel, Mount, MountMountFlags, MountOperationResult, MountUnmountFlags, NetworkConnectivity, NetworkMonitor, NotificationPriority, OutputStreamSpliceFlags, PasswordSave, PollableInputStream, PollableOutputStream, PollableReturn, PowerProfileMonitor, Proxy, ProxyResolver, RemoteActionGroup, ResolverError, ResolverNameLookupFlags, ResolverRecordType, ResourceError, ResourceFlags, ResourceLookupFlags, Resources, RubySeekable, Seekable, SettingsBindFlags, SocketClientEvent, SocketConnectable, SocketFamily, SocketListenerEvent, SocketMsgFlags, SocketProtocol, SocketType, SubprocessFlags, TestDBusFlags, TlsAuthenticationMode, TlsBackend, TlsCertificateFlags, TlsCertificateRequestFlags, TlsChannelBindingError, TlsChannelBindingType, TlsClientConnection, TlsDatabaseLookupFlags, TlsDatabaseVerifyFlags, TlsError, TlsFileDatabase, TlsInteractionResult, TlsPasswordFlags, TlsProtocolVersion, TlsRehandshakeMode, TlsServerConnection, UnixSocketAddressType, Volume, ZlibCompressorFormat Classes: AppInfoMonitor, AppLaunchContext, Application, ApplicationCommandLine, BufferedInputStream, BufferedOutputStream, BytesIcon, Cancellable, CharsetConverter, ContentType, ConverterInputStream, ConverterOutputStream, Credentials, DBusActionGroup, DBusAuthObserver, DBusConnection, DBusInterfaceSkeleton, DBusMenuModel, DBusMessage, DBusMethodInvocation, DBusObjectManagerClient, DBusObjectManagerServer, DBusObjectProxy, DBusObjectSkeleton, DBusProxy, DBusServer, DataInputStream, DataOutputStream, DebugControllerDBus, DesktopAppInfo, Emblem, EmblemedIcon, Error, FileEnumerator, FileIOStream, FileIcon, FileInfo, FileInputStream, FileMonitor, FileOutputStream, FilenameCompleter, FilterInputStream, FilterOutputStream, IOModule, IOStream, InetAddress, InetAddressMask, InetSocketAddress, InputStream, ListStore, Loader, MemoryInputStream, MemoryOutputStream, Menu, MenuAttributeIter, MenuItem, MenuLinkIter, MenuModel, MountOperation, NativeSocketAddress, NativeVolumeMonitor, NetworkAddress, NetworkService, Notification, OutputStream, Permission, PropertyAction, ProxyAddress, ProxyAddressEnumerator, Resolver, RubyInputStream, RubyOutputStream, Settings, SettingsBackend, SettingsSchemaSource, SimpleAction, SimpleActionGroup, SimpleAsyncResult, SimpleIOStream, SimplePermission, SimpleProxyResolver, Socket, SocketAddress, SocketAddressEnumerator, SocketClient, SocketConnection, SocketControlMessage, SocketListener, SocketService, Subprocess, SubprocessLauncher, Task, TcpConnection, TcpWrapperConnection, TestDBus, ThemedIcon, ThreadedResolver, ThreadedSocketService, TlsCertificate, TlsConnection, TlsDatabase, TlsInteraction, TlsPassword, UnixConnection, UnixCredentialsMessage, UnixFDList, UnixFDMessage, UnixInputStream, UnixMountMonitor, UnixOutputStream, UnixSocketAddress, Vfs, VolumeMonitor, ZlibCompressor, ZlibDecompressor
Constant Summary collapse
- DBUS_METHOD_INVOCATION_HANDLED =
The value returned by handlers of the signals generated by the
gdbus-codegentool to indicate that a method call has been handled by an implementation. It is equal to true, but using this macro is sometimes more readable.In code that needs to be backwards-compatible with older GLib, use true instead, often written like this:
|[ g_dbus_method_invocation_return_error (invocation, ...); return TRUE; // handled ]|
true- DBUS_METHOD_INVOCATION_UNHANDLED =
The value returned by handlers of the signals generated by the
gdbus-codegentool to indicate that a method call has not been handled by an implementation. It is equal to false, but using this macro is sometimes more readable.In code that needs to be backwards-compatible with older GLib, use false instead.
false- DEBUG_CONTROLLER_EXTENSION_POINT_NAME =
Extension point for debug control functionality. See [Extending GIO][extending-gio].
gio-debug-controller
- DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME =
Extension point for default handler to URI association. See [Extending GIO][extending-gio].
gio-desktop-app-info-lookup
- DRIVE_IDENTIFIER_KIND_UNIX_DEVICE =
The string used to obtain a Unix device path with g_drive_get_identifier().
unix-device
- FILE_ATTRIBUTE_ACCESS_CAN_DELETE =
A key in the "access" namespace for checking deletion privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to delete the file.
access::can-delete
- FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE =
A key in the "access" namespace for getting execution privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to execute the file.
access::can-execute
- FILE_ATTRIBUTE_ACCESS_CAN_READ =
A key in the "access" namespace for getting read privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to read the file.
access::can-read
- FILE_ATTRIBUTE_ACCESS_CAN_RENAME =
A key in the "access" namespace for checking renaming privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to rename the file.
access::can-rename
- FILE_ATTRIBUTE_ACCESS_CAN_TRASH =
A key in the "access" namespace for checking trashing privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to move the file to the trash.
access::can-trash
- FILE_ATTRIBUTE_ACCESS_CAN_WRITE =
A key in the "access" namespace for getting write privileges.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
This attribute will be true if the user is able to write to the file.
access::can-write
- FILE_ATTRIBUTE_DOS_IS_ARCHIVE =
A key in the "dos" namespace for checking if the file's archive flag is set.
This attribute is true if the archive flag is set.
This attribute is only available for DOS file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
dos::is-archive
- FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT =
A key in the "dos" namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).
This attribute is true if file is a reparse point of type IO_REPARSE_TAG_MOUNT_POINT.
This attribute is only available for DOS file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
dos::is-mountpoint
- FILE_ATTRIBUTE_DOS_IS_SYSTEM =
A key in the "dos" namespace for checking if the file's backup flag is set.
This attribute is true if the backup flag is set.
This attribute is only available for DOS file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
dos::is-system
- FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG =
A key in the "dos" namespace for getting the file NTFS reparse tag.
This value is 0 for files that are not reparse points.
See the Reparse Tags page for possible reparse tag values.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
dos::reparse-point-tag
- FILE_ATTRIBUTE_ETAG_VALUE =
A key in the "etag" namespace for getting the value of the file's entity tag.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
etag::value
- FILE_ATTRIBUTE_FILESYSTEM_FREE =
A key in the "filesystem" namespace for getting the number of bytes of free space left on the file system.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
filesystem::free
- FILE_ATTRIBUTE_FILESYSTEM_READONLY =
A key in the "filesystem" namespace for checking if the file system is read only.
Is set to true if the file system is read only.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
filesystem::readonly
- FILE_ATTRIBUTE_FILESYSTEM_REMOTE =
A key in the "filesystem" namespace for checking if the file system is remote.
Is set to true if the file system is remote.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
filesystem::remote
- FILE_ATTRIBUTE_FILESYSTEM_SIZE =
A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, used in g_file_query_filesystem_info().
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
filesystem::size
- FILE_ATTRIBUTE_FILESYSTEM_TYPE =
A key in the "filesystem" namespace for getting the file system's type.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
filesystem::type
- FILE_ATTRIBUTE_FILESYSTEM_USED =
A key in the "filesystem" namespace for getting the number of bytes used by data on the file system.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
filesystem::used
- FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW =
A key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g. thumbnail) files on the file system.
The value for this key contain a GFilesystem::PreviewType.
filesystem::use-preview
- FILE_ATTRIBUTE_GVFS_BACKEND =
A key in the "gvfs" namespace that gets the name of the current GVFS backend in use.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
gvfs::backend
- FILE_ATTRIBUTE_ID_FILE =
A key in the "id" namespace for getting a file identifier.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
An example use would be during listing files, to avoid recursive directory scanning.
id::file
- FILE_ATTRIBUTE_ID_FILESYSTEM =
A key in the "id" namespace for getting the file system identifier.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
An example use would be during drag and drop to see if the source and target are on the same filesystem (default to move) or not (default to copy).
id::filesystem
- FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-eject
- FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-mount
- FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-poll
- FILE_ATTRIBUTE_MOUNTABLE_CAN_START =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-start
- FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-start-degraded
- FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-stop
- FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::can-unmount
- FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI =
A key in the "mountable" namespace for getting the HAL UDI for the mountable file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
mountable::hal-udi
- FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC =
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
mountable::is-media-check-automatic
- FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE =
A key in the "mountable" namespace for getting the GDrive::StartStopType.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
mountable::start-stop-type
- FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE =
A key in the "mountable" namespace for getting the unix device.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
mountable::unix-device
- FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE =
A key in the "mountable" namespace for getting the unix device file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
mountable::unix-device-file
- FILE_ATTRIBUTE_OWNER_GROUP =
A key in the "owner" namespace for getting the file owner's group.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
owner::group
- FILE_ATTRIBUTE_OWNER_USER =
A key in the "owner" namespace for getting the user name of the file's owner.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
owner::user
- FILE_ATTRIBUTE_OWNER_USER_REAL =
A key in the "owner" namespace for getting the real name of the user that owns the file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
owner::user-real
- FILE_ATTRIBUTE_PREVIEW_ICON =
A key in the "preview" namespace for getting a #GIcon that can be used to get preview of the file.
For example, it may be a low resolution thumbnail without metadata.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
preview::icon
- FILE_ATTRIBUTE_RECENT_MODIFIED =
A key in the "recent" namespace for getting time, when the metadata for the file in
recent:///was last changed.Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_INT64.
recent::modified
- FILE_ATTRIBUTE_SELINUX_CONTEXT =
A key in the "selinux" namespace for getting the file's SELinux context.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
Note that this attribute is only available if GLib has been built with SELinux support.
selinux::context
- FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE =
A key in the "standard" namespace for getting the amount of disk space that is consumed by the file (in bytes).
This will generally be larger than the file size (due to block size overhead) but can occasionally be smaller (for example, for sparse files).
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
standard::allocated-size
- FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE =
A key in the "standard" namespace for getting the content type of the file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
The value for this key should contain a valid content type.
standard::content-type
- FILE_ATTRIBUTE_STANDARD_COPY_NAME =
A key in the "standard" namespace for getting the copy name of the file.
The copy name is an optional version of the name. If available it's always in UTF8, and corresponds directly to the original filename (only transcoded to UTF8). This is useful if you want to copy the file to another filesystem that might have a different encoding. If the filename is not a valid string in the encoding selected for the filesystem it is in then the copy name will not be set.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::copy-name
- FILE_ATTRIBUTE_STANDARD_DESCRIPTION =
A key in the "standard" namespace for getting the description of the file.
The description is a utf8 string that describes the file, generally containing the filename, but can also contain further information. Example descriptions could be "filename (on hostname)" for a remote file or "filename (in trash)" for a file in the trash. This is useful for instance as the window title when displaying a directory or for a bookmarks menu.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::description
- FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME =
A key in the "standard" namespace for getting the display name of the file.
A display name is guaranteed to be in UTF-8 and can thus be displayed in the UI. It is guaranteed to be set on every file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::display-name
- FILE_ATTRIBUTE_STANDARD_EDIT_NAME =
A key in the "standard" namespace for edit name of the file.
An edit name is similar to the display name, but it is meant to be used when you want to rename the file in the UI. The display name might contain information you don't want in the new filename (such as "(invalid unicode)" if the filename was in an invalid encoding).
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::edit-name
- FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE =
A key in the "standard" namespace for getting the fast content type.
The fast content type isn't as reliable as the regular one, as it only uses the filename to guess it, but it is faster to calculate than the regular content type.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::fast-content-type
- FILE_ATTRIBUTE_STANDARD_ICON =
A key in the "standard" namespace for getting the icon for the file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
standard::icon
- FILE_ATTRIBUTE_STANDARD_IS_BACKUP =
A key in the "standard" namespace for checking if a file is a backup file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
standard::is-backup
- FILE_ATTRIBUTE_STANDARD_IS_HIDDEN =
A key in the "standard" namespace for checking if a file is hidden.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
standard::is-hidden
- FILE_ATTRIBUTE_STANDARD_IS_SYMLINK =
A key in the "standard" namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type.
On Windows NTFS mountpoints are considered to be symlinks as well.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
standard::is-symlink
- FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL =
A key in the "standard" namespace for checking if a file is virtual.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
standard::is-virtual
- FILE_ATTRIBUTE_STANDARD_IS_VOLATILE =
A key in the "standard" namespace for checking if a file is volatile. This is meant for opaque, non-POSIX-like backends to indicate that the URI is not persistent. Applications should look at %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
standard::is-volatile
- FILE_ATTRIBUTE_STANDARD_NAME =
A key in the "standard" namespace for getting the name of the file.
The name is the on-disk filename which may not be in any known encoding, and can thus not be generally displayed as is. It is guaranteed to be set on every file.
Use %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the name in a user interface.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
standard::name
- FILE_ATTRIBUTE_STANDARD_SIZE =
A key in the "standard" namespace for getting the file's size (in bytes).
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
standard::size
- FILE_ATTRIBUTE_STANDARD_SORT_ORDER =
A key in the "standard" namespace for setting the sort order of a file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32.
An example use would be in file managers, which would use this key to set the order files are displayed. Files with smaller sort order should be sorted first, and files without sort order as if sort order was zero.
standard::sort-order
- FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON =
A key in the "standard" namespace for getting the symbolic icon for the file.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT.
The value for this key should contain a #GIcon.
standard::symbolic-icon
- FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET =
A key in the "standard" namespace for getting the symlink target, if the file is a symlink.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
standard::symlink-target
- FILE_ATTRIBUTE_STANDARD_TARGET_URI =
A key in the "standard" namespace for getting the target URI for the file, in the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
standard::target-uri
- FILE_ATTRIBUTE_STANDARD_TYPE =
A key in the "standard" namespace for storing file types.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
The value for this key should contain a GFile::Type.
standard::type
- FILE_ATTRIBUTE_THUMBNAILING_FAILED =
A key in the "thumbnail" namespace for checking if thumbnailing failed.
This attribute is true if thumbnailing failed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::failed
- FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE =
A key in the "thumbnail" namespace for checking if thumbnailing failed for the large image.
This attribute is true if thumbnailing failed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::failed-large
- FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL =
A key in the "thumbnail" namespace for checking if thumbnailing failed for the normal image.
This attribute is true if thumbnailing failed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::failed-normal
- FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE =
A key in the "thumbnail" namespace for checking if thumbnailing failed for the x-large image.
This attribute is true if thumbnailing failed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::failed-xlarge
- FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE =
A key in the "thumbnail" namespace for checking if thumbnailing failed for the xx-large image.
This attribute is true if thumbnailing failed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::failed-xxlarge
- FILE_ATTRIBUTE_THUMBNAIL_IS_VALID =
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.
This attribute is true if the thumbnail is up-to-date with the file it represents, and false if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is true and this attribute is false, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::is-valid
- FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE =
A key in the "thumbnail" namespace for checking whether the large thumbnail is outdated.
This attribute is true if the large thumbnail is up-to-date with the file it represents, and false if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE is true and this attribute is false, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::is-valid-large
- FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL =
A key in the "thumbnail" namespace for checking whether the normal thumbnail is outdated.
This attribute is true if the normal thumbnail is up-to-date with the file it represents, and false if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL is true and this attribute is false, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::is-valid-normal
- FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE =
A key in the "thumbnail" namespace for checking whether the x-large thumbnail is outdated.
This attribute is true if the x-large thumbnail is up-to-date with the file it represents, and false if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE is true and this attribute is false, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::is-valid-xlarge
- FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE =
A key in the "thumbnail" namespace for checking whether the xx-large thumbnail is outdated.
This attribute is true if the x-large thumbnail is up-to-date with the file it represents, and false if the file has been modified since the thumbnail was generated.
If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE is true and this attribute is false, it indicates that thumbnailing may be attempted again and may succeed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
thumbnail::is-valid-xxlarge
- FILE_ATTRIBUTE_THUMBNAIL_PATH =
A key in the "thumbnail" namespace for getting the path to the thumbnail image with the biggest size available.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
thumbnail::path
- FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE =
A key in the "thumbnail" namespace for getting the path to the large thumbnail image.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
thumbnail::path-large
- FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL =
A key in the "thumbnail" namespace for getting the path to the normal thumbnail image.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
thumbnail::path-normal
- FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE =
A key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
thumbnail::path-xlarge
- FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE =
A key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
thumbnail::path-xxlarge
- FILE_ATTRIBUTE_TIME_ACCESS =
A key in the "time" namespace for getting the time the file was last accessed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was last accessed, in seconds since the UNIX epoch.
time::access
- FILE_ATTRIBUTE_TIME_ACCESS_NSEC =
A key in the "time" namespace for getting the nanoseconds of the time the file was last accessed. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::access-nsec
- FILE_ATTRIBUTE_TIME_ACCESS_USEC =
A key in the "time" namespace for getting the microseconds of the time the file was last accessed.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_ACCESS.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::access-usec
- FILE_ATTRIBUTE_TIME_CHANGED =
A key in the "time" namespace for getting the time the file was last changed.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was last changed, in seconds since the UNIX epoch.
This corresponds to the traditional UNIX ctime.
time::changed
- FILE_ATTRIBUTE_TIME_CHANGED_NSEC =
A key in the "time" namespace for getting the nanoseconds of the time the file was last changed. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::changed-nsec
- FILE_ATTRIBUTE_TIME_CHANGED_USEC =
A key in the "time" namespace for getting the microseconds of the time the file was last changed.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CHANGED.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::changed-usec
- FILE_ATTRIBUTE_TIME_CREATED =
A key in the "time" namespace for getting the time the file was created.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was created, in seconds since the UNIX epoch.
This may correspond to Linux
stx_btime, FreeBSDst_birthtim, NetBSDst_birthtimeor NTFSctime. time::created
- FILE_ATTRIBUTE_TIME_CREATED_NSEC =
A key in the "time" namespace for getting the nanoseconds of the time the file was created. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::created-nsec
- FILE_ATTRIBUTE_TIME_CREATED_USEC =
A key in the "time" namespace for getting the microseconds of the time the file was created.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_CREATED.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::created-usec
- FILE_ATTRIBUTE_TIME_MODIFIED =
A key in the "time" namespace for getting the time the file was last modified.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the file was modified, in seconds since the UNIX epoch.
time::modified
- FILE_ATTRIBUTE_TIME_MODIFIED_NSEC =
A key in the "time" namespace for getting the nanoseconds of the time the file was last modified. This should be used in conjunction with #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::modified-nsec
- FILE_ATTRIBUTE_TIME_MODIFIED_USEC =
A key in the "time" namespace for getting the microseconds of the time the file was last modified.
This should be used in conjunction with %G_FILE_ATTRIBUTE_TIME_MODIFIED.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
time::modified-usec
- FILE_ATTRIBUTE_TRASH_DELETION_DATE =
A key in the "trash" namespace for getting the deletion date and time of a file inside the
trash:///folder.The format of the returned string is
YYYY-MM-DDThh:mm:ss.Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING.
trash::deletion-date
- FILE_ATTRIBUTE_TRASH_ITEM_COUNT =
A key in the "trash" namespace for getting the number of (toplevel) items that are present in the
trash:///folder.Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
trash::item-count
- FILE_ATTRIBUTE_TRASH_ORIG_PATH =
A key in the "trash" namespace for getting the original path of a file inside the
trash:///folder before it was trashed.Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.
trash::orig-path
- FILE_ATTRIBUTE_UNIX_BLOCKS =
A key in the "unix" namespace for getting the number of blocks allocated for the file.
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
unix::blocks
- FILE_ATTRIBUTE_UNIX_BLOCK_SIZE =
A key in the "unix" namespace for getting the block size for the file system.
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::block-size
- FILE_ATTRIBUTE_UNIX_DEVICE =
A key in the "unix" namespace for getting the device id of the device the file is located on (see stat() documentation).
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::device
- FILE_ATTRIBUTE_UNIX_GID =
A key in the "unix" namespace for getting the group ID for the file.
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::gid
- FILE_ATTRIBUTE_UNIX_INODE =
A key in the "unix" namespace for getting the inode of the file.
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64.
unix::inode
- FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT =
A key in the "unix" namespace for checking if the file represents a UNIX mount point.
This attribute is true if the file is a UNIX mount point.
Since 2.58,
/is considered to be a mount point.This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
unix::is-mountpoint
- FILE_ATTRIBUTE_UNIX_MODE =
A key in the "unix" namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc).
See the documentation for
lstat(): this attribute is equivalent to thest_modemember ofstruct stat, and includes both the file type and permissions.This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::mode
- FILE_ATTRIBUTE_UNIX_NLINK =
A key in the "unix" namespace for getting the number of hard links for a file.
See the documentation for
lstat().This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::nlink
- FILE_ATTRIBUTE_UNIX_RDEV =
A key in the "unix" namespace for getting the device ID for the file (if it is a special file).
See the documentation for
lstat().This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::rdev
- FILE_ATTRIBUTE_UNIX_UID =
A key in the "unix" namespace for getting the user ID for the file.
This attribute is only available for UNIX file systems.
Corresponding GFile::AttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32.
unix::uid
- MEMORY_MONITOR_EXTENSION_POINT_NAME =
Extension point for memory usage monitoring functionality. See [Extending GIO][extending-gio].
gio-memory-monitor
- MENU_ATTRIBUTE_ACTION =
The menu item attribute which holds the action name of the item. Action names are namespaced with an identifier for the action group in which the action resides. For example, "win." for window-specific actions and "app." for application-wide actions.
See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().
action- MENU_ATTRIBUTE_ACTION_NAMESPACE =
The menu item attribute that holds the namespace for all action names in menus that are linked from this item.
action-namespace
- MENU_ATTRIBUTE_ICON =
The menu item attribute which holds the icon of the item.
The icon is stored in the format returned by g_icon_serialize().
This attribute is intended only to represent 'noun' icons such as favicons for a webpage, or application icons. It should not be used for 'verbs' (ie: stock icons).
icon- MENU_ATTRIBUTE_LABEL =
The menu item attribute which holds the label of the item.
label- MENU_ATTRIBUTE_TARGET =
The menu item attribute which holds the target with which the item's action will be activated.
See also g_menu_item_set_action_and_target()
target- MENU_EXPORTER_MAX_SECTION_SIZE =
The maximum number of entries in a menu section supported by g_dbus_connection_export_menu_model().
The exact value of the limit may change in future GLib versions.
1000- MENU_LINK_SECTION =
The name of the link that associates a menu item with a section. The linked menu will usually be shown in place of the menu item, using the item's label as a header.
See also g_menu_item_set_link().
section- MENU_LINK_SUBMENU =
The name of the link that associates a menu item with a submenu.
See also g_menu_item_set_link().
- NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME =
gio-native-volume-monitor
- NETWORK_MONITOR_EXTENSION_POINT_NAME =
Extension point for network status monitoring functionality. See [Extending GIO][extending-gio].
gio-network-monitor
- POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME =
Extension point for power profile usage monitoring functionality. See [Extending GIO][extending-gio].
gio-power-profile-monitor
- PROXY_EXTENSION_POINT_NAME =
Extension point for proxy functionality. See [Extending GIO][extending-gio].
gio-proxy
- PROXY_RESOLVER_EXTENSION_POINT_NAME =
Extension point for proxy resolving functionality. See [Extending GIO][extending-gio].
gio-proxy-resolver
- SETTINGS_BACKEND_EXTENSION_POINT_NAME =
Extension point for GSettings::Backend functionality.
gsettings-backend
- TLS_BACKEND_EXTENSION_POINT_NAME =
Extension point for TLS functionality via GTls::Backend. See [Extending GIO][extending-gio].
gio-tls-backend
- TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT =
The purpose used to verify the client certificate in a TLS connection. Used by TLS servers.
1.3.6.1.5.5.7.3.2
- TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER =
The purpose used to verify the server certificate in a TLS connection. This is the most common purpose in use. Used by TLS clients.
1.3.6.1.5.5.7.3.1
- VFS_EXTENSION_POINT_NAME =
Extension point for #GVfs functionality. See [Extending GIO][extending-gio].
gio-vfs
- VOLUME_IDENTIFIER_KIND_CLASS =
The string used to obtain the volume class with g_volume_get_identifier().
Known volume classes include
device,network, andloop. Other classes may be added in the future.This is intended to be used by applications to classify #GVolume instances into different sections - for example a file manager or file chooser can use this information to show
networkvolumes under a "Network" heading anddevicevolumes under a "Devices" heading. class
- VOLUME_IDENTIFIER_KIND_HAL_UDI =
The string used to obtain a Hal UDI with g_volume_get_identifier().
hal-udi
- VOLUME_IDENTIFIER_KIND_LABEL =
The string used to obtain a filesystem label with g_volume_get_identifier().
label- VOLUME_IDENTIFIER_KIND_NFS_MOUNT =
The string used to obtain a NFS mount with g_volume_get_identifier().
nfs-mount
- VOLUME_IDENTIFIER_KIND_UNIX_DEVICE =
The string used to obtain a Unix device path with g_volume_get_identifier().
unix-device
- VOLUME_IDENTIFIER_KIND_UUID =
The string used to obtain a UUID with g_volume_get_identifier().
uuid- VOLUME_MONITOR_EXTENSION_POINT_NAME =
Extension point for volume monitor functionality. See [Extending GIO][extending-gio].
gio-volume-monitor
- LOG_DOMAIN =
"Gio"- Version =
GLib::Version
Instance Method Summary collapse
-
#action_name_is_valid(action_name) ⇒ Boolean
Checks if action_name is valid.
-
#action_parse_detailed_name(detailed_name, action_name, target_value) ⇒ Boolean
Parses a detailed action name into its separate name and target components.
-
#action_print_detailed_name(action_name, target_value) ⇒ String
Formats a detailed action name from action_name and target_value.
-
#app_info_create_from_commandline(commandline, application_name, flags) ⇒ Gio::AppInfo
Creates a new GApp::Info from the given information.
-
#app_info_get_all ⇒ GLib::List<Gio::AppInfo>
Gets a list of all of the applications currently registered on this system.
-
#app_info_get_all_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of all GApp::Infos for a given content type, including the recommended and fallback GApp::Infos.
-
#app_info_get_default_for_type(content_type, must_support_uris) ⇒ Gio::AppInfo
Gets the default GApp::Info for a given content type.
-
#app_info_get_default_for_type_async(content_type, must_support_uris, cancellable, callback, user_data) ⇒ nil
Asynchronously gets the default GApp::Info for a given content type.
-
#app_info_get_default_for_type_finish(result) ⇒ Gio::AppInfo
Finishes a default GApp::Info lookup started by g_app_info_get_default_for_type_async().
-
#app_info_get_default_for_uri_scheme(uri_scheme) ⇒ Gio::AppInfo
Gets the default application for handling URIs with the given URI scheme.
-
#app_info_get_default_for_uri_scheme_async(uri_scheme, cancellable, callback, user_data) ⇒ nil
Asynchronously gets the default application for handling URIs with the given URI scheme.
-
#app_info_get_default_for_uri_scheme_finish(result) ⇒ Gio::AppInfo
Finishes a default GApp::Info lookup started by g_app_info_get_default_for_uri_scheme_async().
-
#app_info_get_fallback_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of fallback GApp::Infos for a given content type, i.e.
-
#app_info_get_recommended_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of recommended GApp::Infos for a given content type, i.e.
-
#app_info_launch_default_for_uri(uri, context) ⇒ Boolean
Utility function that launches the default application registered to handle the specified uri.
-
#app_info_launch_default_for_uri_async(uri, context, cancellable, callback, user_data) ⇒ nil
Async version of g_app_info_launch_default_for_uri().
-
#app_info_launch_default_for_uri_finish(result) ⇒ Boolean
Finishes an asynchronous launch-default-for-uri operation.
-
#app_info_reset_type_associations(content_type) ⇒ nil
Removes all changes to the type associations done by g_app_info_set_as_default_for_type(), g_app_info_set_as_default_for_extension(), g_app_info_add_supports_type() or g_app_info_remove_supports_type().
-
#async_initable_newv_async(object_type, n_parameters, parameters, io_priority, cancellable, callback, user_data) ⇒ nil
Helper function for constructing GAsync::Initable object.
-
#bus_get(bus_type, cancellable, callback, user_data) ⇒ nil
Asynchronously connects to the message bus specified by bus_type.
-
#bus_get_finish(res) ⇒ Gio::DBusConnection
Finishes an operation started with g_bus_get().
-
#bus_get_sync(bus_type, cancellable) ⇒ Gio::DBusConnection
Synchronously connects to the message bus specified by bus_type.
-
#bus_own_name(bus_type, name, flags, bus_acquired_handler, name_acquired_handler, name_lost_handler, user_data, user_data_free_func) ⇒ Integer
Starts acquiring name on the bus specified by bus_type and calls name_acquired_handler and name_lost_handler when the name is acquired respectively lost.
-
#bus_own_name_on_connection(connection, name, flags, name_acquired_handler, name_lost_handler, user_data, user_data_free_func) ⇒ Integer
Like g_bus_own_name() but takes a GDBus::Connection instead of a GBus::Type.
-
#bus_own_name_on_connection_with_closures(connection, name, flags, name_acquired_closure, name_lost_closure) ⇒ Integer
Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.
-
#bus_own_name_with_closures(bus_type, name, flags, bus_acquired_closure, name_acquired_closure, name_lost_closure) ⇒ Integer
Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages.
-
#bus_unown_name(owner_id) ⇒ nil
Stops owning a name.
-
#bus_unwatch_name(watcher_id) ⇒ nil
Stops watching a name.
-
#bus_watch_name(bus_type, name, flags, name_appeared_handler, name_vanished_handler, user_data, user_data_free_func) ⇒ Integer
Starts watching name on the bus specified by bus_type and calls name_appeared_handler and name_vanished_handler when the name is known to have an owner respectively known to lose its owner.
-
#bus_watch_name_on_connection(connection, name, flags, name_appeared_handler, name_vanished_handler, user_data, user_data_free_func) ⇒ Integer
Like g_bus_watch_name() but takes a GDBus::Connection instead of a GBus::Type.
-
#bus_watch_name_on_connection_with_closures(connection, name, flags, name_appeared_closure, name_vanished_closure) ⇒ Integer
Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.
-
#bus_watch_name_with_closures(bus_type, name, flags, name_appeared_closure, name_vanished_closure) ⇒ Integer
Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages.
-
#content_type_can_be_executable(type) ⇒ Boolean
Checks if a content type can be executable.
-
#content_type_equals(type1, type2) ⇒ Boolean
Compares two content types for equality.
-
#content_type_from_mime_type(mime_type) ⇒ String
Tries to find a content type based on the mime type name.
-
#content_type_get_description(type) ⇒ String
Gets the human readable description of the content type.
-
#content_type_get_generic_icon_name(type) ⇒ String
Gets the generic icon name for a content type.
-
#content_type_get_icon(type) ⇒ Gio::Icon
Gets the icon for a content type.
-
#content_type_get_mime_dirs ⇒ Array<String>
Get the list of directories which MIME data is loaded from.
-
#content_type_get_mime_type(type) ⇒ String
Gets the mime type for the content type, if one is registered.
-
#content_type_get_symbolic_icon(type) ⇒ Gio::Icon
Gets the symbolic icon for a content type.
-
#content_type_guess(filename, data, data_size, result_uncertain) ⇒ String
Guesses the content type based on example data.
-
#content_type_guess_for_tree(root) ⇒ Array<String>
Tries to guess the type of the tree with root root, by looking at the files it contains.
-
#content_type_is_a(type, supertype) ⇒ Boolean
Determines if type is a subset of supertype.
-
#content_type_is_mime_type(type, mime_type) ⇒ Boolean
Determines if type is a subset of mime_type.
-
#content_type_is_unknown(type) ⇒ Boolean
Checks if the content type is the generic "unknown" type.
-
#content_type_set_mime_dirs(dirs) ⇒ nil
Set the list of directories used by GIO to load the MIME database.
-
#content_types_get_registered ⇒ GLib::List<String>
Gets a list of strings containing all the registered content types known to the system.
-
#dbus_address_escape_value(string) ⇒ String
Escape string so it can appear in a D-Bus address as the value part of a key-value pair.
-
#dbus_address_get_for_bus_sync(bus_type, cancellable) ⇒ String
Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus_type.
-
#dbus_address_get_stream(address, cancellable, callback, user_data) ⇒ nil
Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.
-
#dbus_address_get_stream_finish(res, out_guid) ⇒ Gio::IOStream
Finishes an operation started with g_dbus_address_get_stream().
-
#dbus_address_get_stream_sync(address, out_guid, cancellable) ⇒ Gio::IOStream
Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.
-
#dbus_annotation_info_lookup(annotations, name) ⇒ String
Looks up the value of an annotation.
-
#dbus_error_encode_gerror(error) ⇒ String
Creates a D-Bus error name to use for error.
-
#dbus_error_get_remote_error(error) ⇒ String
Gets the D-Bus error name used for error, if any.
-
#dbus_error_is_remote_error(error) ⇒ Boolean
Checks if error represents an error received via D-Bus from a remote peer.
-
#dbus_error_new_for_dbus_error(dbus_error_name, dbus_error_message) ⇒ GLib::Error
Creates a #GError based on the contents of dbus_error_name and dbus_error_message.
- #dbus_error_quark ⇒ GLib::Quark
-
#dbus_error_register_error(error_domain, error_code, dbus_error_name) ⇒ Boolean
Creates an association to map between dbus_error_name and #GErrors specified by error_domain and error_code.
-
#dbus_error_register_error_domain(error_domain_quark_name, quark_volatile, entries, num_entries) ⇒ nil
Helper function for associating a #GError error domain with D-Bus error names.
-
#dbus_error_strip_remote_error(error) ⇒ Boolean
Looks for extra information in the error message used to recover the D-Bus error name and strips it if found.
-
#dbus_error_unregister_error(error_domain, error_code, dbus_error_name) ⇒ Boolean
Destroys an association previously set up with g_dbus_error_register_error().
-
#dbus_escape_object_path(s) ⇒ String
This is a language binding friendly version of g_dbus_escape_object_path_bytestring().
-
#dbus_escape_object_path_bytestring(bytes) ⇒ String
Escapes bytes for use in a D-Bus object path component.
-
#dbus_generate_guid ⇒ String
Generate a D-Bus GUID that can be used with e.g.
-
#dbus_gvalue_to_gvariant(gvalue, type) ⇒ GLib::Variant
Converts a #GValue to a #GVariant of the type indicated by the type parameter.
-
#dbus_gvariant_to_gvalue(value, out_gvalue) ⇒ nil
Converts a #GVariant to a #GValue.
-
#dbus_is_address(string) ⇒ Boolean
Checks if string is a D-Bus address.
-
#dbus_is_error_name(string) ⇒ Boolean
Check whether string is a valid D-Bus error name.
-
#dbus_is_guid(string) ⇒ Boolean
Checks if string is a D-Bus GUID.
-
#dbus_is_interface_name(string) ⇒ Boolean
Checks if string is a valid D-Bus interface name.
-
#dbus_is_member_name(string) ⇒ Boolean
Checks if string is a valid D-Bus member (e.g. signal or method) name.
-
#dbus_is_name(string) ⇒ Boolean
Checks if string is a valid D-Bus bus name (either unique or well-known).
-
#dbus_is_supported_address(string) ⇒ Boolean
Like g_dbus_is_address() but also checks if the library supports the transports in string and that key/value pairs for each transport are valid.
-
#dbus_is_unique_name(string) ⇒ Boolean
Checks if string is a valid D-Bus unique bus name.
-
#dbus_unescape_object_path(s) ⇒ Array<Integer>
Unescapes an string that was previously escaped with g_dbus_escape_object_path().
-
#dtls_client_connection_new(base_socket, server_identity) ⇒ Gio::DtlsClientConnection
Creates a new GDtls::ClientConnection wrapping base_socket which is assumed to communicate with the server identified by server_identity.
-
#dtls_server_connection_new(base_socket, certificate) ⇒ Gio::DtlsServerConnection
Creates a new GDtls::ServerConnection wrapping base_socket.
-
#file_new_build_filenamev(args) ⇒ Gio::File
Constructs a #GFile from a vector of elements using the correct separator for filenames.
-
#file_new_for_commandline_arg(arg) ⇒ Gio::File
Creates a #GFile with the given argument from the command line.
-
#file_new_for_commandline_arg_and_cwd(arg, cwd) ⇒ Gio::File
Creates a #GFile with the given argument from the command line.
-
#file_new_for_path(path) ⇒ Gio::File
Constructs a #GFile for a given path.
-
#file_new_for_uri(uri) ⇒ Gio::File
Constructs a #GFile for a given URI.
-
#file_new_tmp(tmpl, iostream) ⇒ Gio::File
Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a #GFile and GFile::IOStream pointing to it.
-
#file_new_tmp_async(tmpl, io_priority, cancellable, callback, user_data) ⇒ nil
Asynchronously opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_file_new_tmp().
-
#file_new_tmp_dir_async(tmpl, io_priority, cancellable, callback, user_data) ⇒ nil
Asynchronously creates a directory in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().
-
#file_new_tmp_dir_finish(result) ⇒ Gio::File
Finishes a temporary directory creation started by g_file_new_tmp_dir_async().
-
#file_new_tmp_finish(result, iostream) ⇒ Gio::File
Finishes a temporary file creation started by g_file_new_tmp_async().
-
#file_parse_name(parse_name) ⇒ Gio::File
Constructs a #GFile with the given parse_name (i.e. something given by g_file_get_parse_name()).
-
#icon_deserialize(value) ⇒ Gio::Icon
Deserializes a #GIcon previously serialized using g_icon_serialize().
-
#icon_new_for_string(str) ⇒ Gio::Icon
Generate a #GIcon instance from str.
-
#initable_newv(object_type, n_parameters, parameters, cancellable) ⇒ GObject::Object
Helper function for constructing #GInitable object.
-
#io_error_from_errno(err_no) ⇒ Gio::IOErrorEnum
Converts
errno.herror codes into GIO error codes. -
#io_error_from_file_error(file_error) ⇒ Gio::IOErrorEnum
Converts GFile::Error error codes into GIO error codes.
-
#io_error_quark ⇒ GLib::Quark
Gets the GIO Error Quark.
-
#io_extension_point_implement(extension_point_name, type, extension_name, priority) ⇒ Gio::IOExtension
Registers type as extension for the extension point with name extension_point_name.
-
#io_extension_point_lookup(name) ⇒ Gio::IOExtensionPoint
Looks up an existing extension point.
-
#io_extension_point_register(name) ⇒ Gio::IOExtensionPoint
Registers an extension point.
-
#io_modules_load_all_in_directory(dirname) ⇒ GLib::List<Gio::IOModule>
Loads all the modules in the specified directory.
-
#io_modules_load_all_in_directory_with_scope(dirname, scope) ⇒ GLib::List<Gio::IOModule>
Loads all the modules in the specified directory.
-
#io_modules_scan_all_in_directory(dirname) ⇒ nil
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
-
#io_modules_scan_all_in_directory_with_scope(dirname, scope) ⇒ nil
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
-
#io_scheduler_cancel_all_jobs ⇒ nil
Cancels all cancellable I/O jobs.
-
#io_scheduler_push_job(job_func, user_data, notify, io_priority, cancellable) ⇒ nil
Schedules the I/O job to run in another thread.
-
#keyfile_settings_backend_new(filename, root_path, root_group) ⇒ Gio::SettingsBackend
Creates a keyfile-backed GSettings::Backend.
-
#memory_monitor_dup_default ⇒ Gio::MemoryMonitor
Gets a reference to the default GMemory::Monitor for the system.
-
#memory_settings_backend_new ⇒ Gio::SettingsBackend
Creates a memory-backed GSettings::Backend.
-
#network_monitor_get_default ⇒ Gio::NetworkMonitor
Gets the default GNetwork::Monitor for the system.
-
#networking_init ⇒ nil
Initializes the platform networking libraries (eg, on Windows, this calls WSAStartup()).
-
#null_settings_backend_new ⇒ Gio::SettingsBackend
Creates a readonly GSettings::Backend.
-
#pollable_source_new(pollable_stream) ⇒ GLib::Source
Utility method for GPollable::InputStream and #GPollableOutputStream implementations.
-
#pollable_source_new_full(pollable_stream, child_source, cancellable) ⇒ GLib::Source
Utility method for GPollable::InputStream and #GPollableOutputStream implementations.
-
#pollable_stream_read(stream, buffer, count, blocking, cancellable) ⇒ Gio::gssize
Tries to read from stream, as with g_input_stream_read() (if blocking is true) or g_pollable_input_stream_read_nonblocking() (if blocking is false).
-
#pollable_stream_write(stream, buffer, count, blocking, cancellable) ⇒ Gio::gssize
Tries to write to stream, as with g_output_stream_write() (if blocking is true) or g_pollable_output_stream_write_nonblocking() (if blocking is false).
-
#pollable_stream_write_all(stream, buffer, count, blocking, bytes_written, cancellable) ⇒ Boolean
Tries to write count bytes to stream, as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write().
-
#power_profile_monitor_dup_default ⇒ Gio::PowerProfileMonitor
Gets a reference to the default GPower::ProfileMonitor for the system.
-
#proxy_get_default_for_protocol(protocol) ⇒ Gio::Proxy
Find the
gio-proxyextension point for a proxy implementation that supports the specified protocol. -
#proxy_resolver_get_default ⇒ Gio::ProxyResolver
Gets the default GProxy::Resolver for the system.
-
#resolver_error_quark ⇒ GLib::Quark
Gets the #GResolver Error Quark.
-
#resource_error_quark ⇒ GLib::Quark
Gets the #GResource Error Quark.
-
#resource_load(filename) ⇒ Gio::Resource
Loads a binary resource bundle and creates a #GResource representation of it, allowing you to query it for data.
-
#resources_enumerate_children(path, lookup_flags) ⇒ Array<String>
Returns all the names of children at the specified path in the set of globally registered resources.
-
#resources_get_info(path, lookup_flags, size, flags) ⇒ Boolean
Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.
-
#resources_lookup_data(path, lookup_flags) ⇒ GLib::Bytes
Looks for a file at the specified path in the set of globally registered resources and returns a #GBytes that lets you directly access the data in memory.
-
#resources_open_stream(path, lookup_flags) ⇒ Gio::InputStream
Looks for a file at the specified path in the set of globally registered resources and returns a GInput::Stream that lets you read the data.
-
#resources_register(resource) ⇒ nil
Registers the resource with the process-global set of resources.
-
#resources_unregister(resource) ⇒ nil
Unregisters the resource from the process-global set of resources.
-
#settings_schema_source_get_default ⇒ Gio::SettingsSchemaSource
Gets the default system schema source.
-
#simple_async_report_error_in_idle(object, callback, user_data, domain, code, format, array) ⇒ nil
Reports an error in an asynchronous function in an idle function by directly setting the contents of the GAsync::Result with the given error information.
-
#simple_async_report_gerror_in_idle(object, callback, user_data, error) ⇒ nil
Reports an error in an idle function.
-
#simple_async_report_take_gerror_in_idle(object, callback, user_data, error) ⇒ nil
Reports an error in an idle function.
-
#srv_target_list_sort(targets) ⇒ GLib::List<GObject>
Sorts targets in place according to the algorithm in RFC 2782.
-
#tls_backend_get_default ⇒ Gio::TlsBackend
Gets the default GTls::Backend for the system.
-
#tls_channel_binding_error_quark ⇒ GLib::Quark
Gets the TLS channel binding error quark.
-
#tls_client_connection_new(base_io_stream, server_identity) ⇒ Gio::TlsClientConnection
Creates a new GTls::ClientConnection wrapping base_io_stream (which must have pollable input and output streams) which is assumed to communicate with the server identified by server_identity.
-
#tls_error_quark ⇒ GLib::Quark
Gets the TLS error quark.
-
#tls_file_database_new(anchors) ⇒ Gio::TlsFileDatabase
Creates a new GTls::FileDatabase which uses anchor certificate authorities in anchors to verify certificate chains.
-
#tls_server_connection_new(base_io_stream, certificate) ⇒ Gio::TlsServerConnection
Creates a new GTls::ServerConnection wrapping base_io_stream (which must have pollable input and output streams).
-
#unix_is_mount_path_system_internal(mount_path) ⇒ Boolean
Determines if mount_path is considered an implementation of the OS.
-
#unix_is_system_device_path(device_path) ⇒ Boolean
Determines if device_path is considered a block device path which is only used in implementation of the OS.
-
#unix_is_system_fs_type(fs_type) ⇒ Boolean
Determines if fs_type is considered a type of file system which is only used in implementation of the OS.
-
#unix_mount_at(mount_path, time_read) ⇒ Gio::UnixMountEntry
Gets a GUnix::MountEntry for a given mount path.
-
#unix_mount_compare(mount1, mount2) ⇒ Integer
Compares two unix mounts.
-
#unix_mount_copy(mount_entry) ⇒ Gio::UnixMountEntry
Makes a copy of mount_entry.
-
#unix_mount_for(file_path, time_read) ⇒ Gio::UnixMountEntry
Gets a GUnix::MountEntry for a given file path.
-
#unix_mount_free(mount_entry) ⇒ nil
Frees a unix mount.
-
#unix_mount_get_device_path(mount_entry) ⇒ Gio::filename
Gets the device path for a unix mount.
-
#unix_mount_get_fs_type(mount_entry) ⇒ String
Gets the filesystem type for the unix mount.
-
#unix_mount_get_mount_path(mount_entry) ⇒ Gio::filename
Gets the mount path for a unix mount.
-
#unix_mount_get_options(mount_entry) ⇒ String
Gets a comma-separated list of mount options for the unix mount.
-
#unix_mount_get_root_path(mount_entry) ⇒ String
Gets the root of the mount within the filesystem.
-
#unix_mount_guess_can_eject(mount_entry) ⇒ Boolean
Guesses whether a Unix mount can be ejected.
-
#unix_mount_guess_icon(mount_entry) ⇒ Gio::Icon
Guesses the icon of a Unix mount.
-
#unix_mount_guess_name(mount_entry) ⇒ String
Guesses the name of a Unix mount.
-
#unix_mount_guess_should_display(mount_entry) ⇒ Boolean
Guesses whether a Unix mount should be displayed in the UI.
-
#unix_mount_guess_symbolic_icon(mount_entry) ⇒ Gio::Icon
Guesses the symbolic icon of a Unix mount.
-
#unix_mount_is_readonly(mount_entry) ⇒ Boolean
Checks if a unix mount is mounted read only.
-
#unix_mount_is_system_internal(mount_entry) ⇒ Boolean
Checks if a Unix mount is a system mount.
-
#unix_mount_point_at(mount_path, time_read) ⇒ Gio::UnixMountPoint
Gets a GUnix::MountPoint for a given mount path.
-
#unix_mount_points_changed_since(time) ⇒ Boolean
Checks if the unix mount points have changed since a given unix time.
-
#unix_mount_points_get(time_read) ⇒ GLib::List<Gio::UnixMountPoint>
Gets a #GList of GUnix::MountPoint containing the unix mount points.
-
#unix_mounts_changed_since(time) ⇒ Boolean
Checks if the unix mounts have changed since a given unix time.
-
#unix_mounts_get(time_read) ⇒ GLib::List<Gio::UnixMountEntry>
Gets a #GList of GUnix::MountEntry containing the unix mounts.
Instance Method Details
#action_name_is_valid(action_name) ⇒ Boolean
Checks if action_name is valid.
action_name is valid if it consists only of alphanumeric characters, plus '-' and '.'. The empty string is not a valid action name.
It is an error to call this function with a non-utf8 action_name. action_name must not be nil.
#action_parse_detailed_name(detailed_name, action_name, target_value) ⇒ Boolean
Parses a detailed action name into its separate name and target components.
Detailed action names can have three formats.
The first format is used to represent an action name with no target
value and consists of just an action name containing no whitespace
nor the characters :, ( or ). For example: app.action.
The second format is used to represent an action with a target value
that is a non-empty string consisting only of alphanumerics, plus -
and .. In that case, the action name and target value are
separated by a double colon (::). For example:
app.action::target.
The third format is used to represent an action with any type of
target value, including strings. The target value follows the action
name, surrounded in parens. For example: app.action(42). The
target value is parsed using g_variant_parse(). If a tuple-typed
value is desired, it must be specified in the same way, resulting in
two sets of parens, for example: app.action((1,2,3)). A string
target can be specified this way as well: app.action('target').
For strings, this third format must be used if target value is
empty or contains characters other than alphanumerics, - and ..
If this function returns true, a non-nil value is guaranteed to be returned in action_name (if a pointer is passed in). A nil value may still be returned in target_value, as the detailed_name may not contain a target.
If returned, the #GVariant in target_value is guaranteed to not be floating.
#action_print_detailed_name(action_name, target_value) ⇒ String
Formats a detailed action name from action_name and target_value.
It is an error to call this function with an invalid action name.
This function is the opposite of g_action_parse_detailed_name(). It will produce a string that can be parsed back to the action_name and target_value by that function.
See that function for the types of strings that will be printed by this function.
#app_info_create_from_commandline(commandline, application_name, flags) ⇒ Gio::AppInfo
Creates a new GApp::Info from the given information.
Note that for commandline, the quoting rules of the Exec key of the freedesktop.org Desktop Entry Specification are applied. For example, if the commandline contains percent-encoded URIs, the percent-character must be doubled in order to prevent it from being swallowed by Exec key unquoting. See the specification for exact quoting rules.
#app_info_get_all ⇒ GLib::List<Gio::AppInfo>
Gets a list of all of the applications currently registered on this system.
For desktop files, this includes applications that have
NoDisplay=true set or are excluded from display by means
of OnlyShowIn or NotShowIn. See g_app_info_should_show().
The returned list does not include applications which have
the Hidden key set.
#app_info_get_all_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of all GApp::Infos for a given content type, including the recommended and fallback GApp::Infos. See g_app_info_get_recommended_for_type() and g_app_info_get_fallback_for_type().
#app_info_get_default_for_type(content_type, must_support_uris) ⇒ Gio::AppInfo
Gets the default GApp::Info for a given content type.
#app_info_get_default_for_type_async(content_type, must_support_uris, cancellable, callback, user_data) ⇒ nil
Asynchronously gets the default GApp::Info for a given content type.
#app_info_get_default_for_type_finish(result) ⇒ Gio::AppInfo
Finishes a default GApp::Info lookup started by g_app_info_get_default_for_type_async().
If no GApp::Info is found, then error will be set to %G_IO_ERROR_NOT_FOUND.
#app_info_get_default_for_uri_scheme(uri_scheme) ⇒ Gio::AppInfo
Gets the default application for handling URIs with the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip".
#app_info_get_default_for_uri_scheme_async(uri_scheme, cancellable, callback, user_data) ⇒ nil
Asynchronously gets the default application for handling URIs with the given URI scheme. A URI scheme is the initial part of the URI, up to but not including the ':', e.g. "http", "ftp" or "sip".
#app_info_get_default_for_uri_scheme_finish(result) ⇒ Gio::AppInfo
Finishes a default GApp::Info lookup started by g_app_info_get_default_for_uri_scheme_async().
If no GApp::Info is found, then error will be set to %G_IO_ERROR_NOT_FOUND.
#app_info_get_fallback_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of fallback GApp::Infos for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly.
#app_info_get_recommended_for_type(content_type) ⇒ GLib::List<Gio::AppInfo>
Gets a list of recommended GApp::Infos for a given content type, i.e. those applications which claim to support the given content type exactly, and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which g_app_info_set_as_last_used_for_type() has been called.
#app_info_launch_default_for_uri(uri, context) ⇒ Boolean
Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required.
The D-Bus–activated applications don't have to be started if your application terminates too soon after this function. To prevent this, use g_app_info_launch_default_for_uri_async() instead.
#app_info_launch_default_for_uri_async(uri, context, cancellable, callback, user_data) ⇒ nil
Async version of g_app_info_launch_default_for_uri().
This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user.
This is also useful if you want to be sure that the D-Bus–activated applications are really started before termination and if you are interested in receiving error information from their activation.
#app_info_launch_default_for_uri_finish(result) ⇒ Boolean
Finishes an asynchronous launch-default-for-uri operation.
#app_info_reset_type_associations(content_type) ⇒ nil
Removes all changes to the type associations done by g_app_info_set_as_default_for_type(), g_app_info_set_as_default_for_extension(), g_app_info_add_supports_type() or g_app_info_remove_supports_type().
#async_initable_newv_async(object_type, n_parameters, parameters, io_priority, cancellable, callback, user_data) ⇒ nil
Helper function for constructing GAsync::Initable object. This is similar to g_object_newv() but also initializes the object asynchronously.
When the initialization is finished, callback will be called. You can then call g_async_initable_new_finish() to get the new object and check for any errors.
#bus_get(bus_type, cancellable, callback, user_data) ⇒ nil
Asynchronously connects to the message bus specified by bus_type.
When the operation is finished, callback will be invoked. You can then call g_bus_get_finish() to get the result of the operation.
This is an asynchronous failable function. See g_bus_get_sync() for the synchronous version.
#bus_get_finish(res) ⇒ Gio::DBusConnection
Finishes an operation started with g_bus_get().
The returned object is a singleton, that is, shared with other callers of g_bus_get() and g_bus_get_sync() for bus_type. In the event that you need a private message bus connection, use g_dbus_address_get_for_bus_sync() and g_dbus_connection_new_for_address() with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned GDBus::Connection object will (usually) have the GDBus::Connection:exit-on-close property set to true.
#bus_get_sync(bus_type, cancellable) ⇒ Gio::DBusConnection
Synchronously connects to the message bus specified by bus_type. Note that the returned object may shared with other callers, e.g. if two separate parts of a process calls this function with the same bus_type, they will share the same object.
This is a synchronous failable function. See g_bus_get() and g_bus_get_finish() for the asynchronous version.
The returned object is a singleton, that is, shared with other callers of g_bus_get() and g_bus_get_sync() for bus_type. In the event that you need a private message bus connection, use g_dbus_address_get_for_bus_sync() and g_dbus_connection_new_for_address() with G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
Note that the returned GDBus::Connection object will (usually) have the GDBus::Connection:exit-on-close property set to true.
#bus_own_name(bus_type, name, flags, bus_acquired_handler, name_acquired_handler, name_lost_handler, user_data, user_data_free_func) ⇒ Integer
Starts acquiring name on the bus specified by bus_type and calls name_acquired_handler and name_lost_handler when the name is acquired respectively lost. Callbacks will be invoked in the [thread-default main context][g-main-context-push-thread-default] of the thread you are calling this function from.
You are guaranteed that one of the name_acquired_handler and name_lost_handler callbacks will be invoked after calling this function - there are three possible cases:
-
name_lost_handler with a nil connection (if a connection to the bus can't be made).
-
bus_acquired_handler then name_lost_handler (if the name can't be obtained)
-
bus_acquired_handler then name_acquired_handler (if the name was obtained).
When you are done owning the name, just call g_bus_unown_name() with the owner id this function returns.
If the name is acquired or lost (for example another application could acquire the name if you allow replacement or the application currently owning the name exits), the handlers are also invoked. If the GDBus::Connection that is used for attempting to own the name closes, then name_lost_handler is invoked since it is no longer possible for other processes to access the process.
You cannot use g_bus_own_name() several times for the same name (unless interleaved with calls to g_bus_unown_name()) - only the first call will work.
Another guarantee is that invocations of name_acquired_handler and name_lost_handler are guaranteed to alternate; that is, if name_acquired_handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be name_lost_handler. The reverse is also true.
If you plan on exporting objects (using e.g. g_dbus_connection_register_object()), note that it is generally too late to export the objects in name_acquired_handler. Instead, you can do this in bus_acquired_handler since you are guaranteed that this will run before name is requested from the bus.
This behavior makes it very simple to write applications that wants to [own names][gdbus-owning-names] and export objects. Simply register objects to be exported in bus_acquired_handler and unregister the objects (if any) in name_lost_handler.
#bus_own_name_on_connection(connection, name, flags, name_acquired_handler, name_lost_handler, user_data, user_data_free_func) ⇒ Integer
Like g_bus_own_name() but takes a GDBus::Connection instead of a GBus::Type.
#bus_own_name_on_connection_with_closures(connection, name, flags, name_acquired_closure, name_lost_closure) ⇒ Integer
Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.
#bus_own_name_with_closures(bus_type, name, flags, bus_acquired_closure, name_acquired_closure, name_lost_closure) ⇒ Integer
Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages.
#bus_unown_name(owner_id) ⇒ nil
Stops owning a name.
Note that there may still be D-Bus traffic to process (relating to owning and unowning the name) in the current thread-default GMain::Context after this function has returned. You should continue to iterate the GMain::Context until the GDestroy::Notify function passed to g_bus_own_name() is called, in order to avoid memory leaks through callbacks queued on the GMain::Context after it’s stopped being iterated.
#bus_unwatch_name(watcher_id) ⇒ nil
Stops watching a name.
Note that there may still be D-Bus traffic to process (relating to watching and unwatching the name) in the current thread-default GMain::Context after this function has returned. You should continue to iterate the GMain::Context until the GDestroy::Notify function passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on the GMain::Context after it’s stopped being iterated.
#bus_watch_name(bus_type, name, flags, name_appeared_handler, name_vanished_handler, user_data, user_data_free_func) ⇒ Integer
Starts watching name on the bus specified by bus_type and calls name_appeared_handler and name_vanished_handler when the name is known to have an owner respectively known to lose its owner. Callbacks will be invoked in the [thread-default main context][g-main-context-push-thread-default] of the thread you are calling this function from.
You are guaranteed that one of the handlers will be invoked after calling this function. When you are done watching the name, just call g_bus_unwatch_name() with the watcher id this function returns.
If the name vanishes or appears (for example the application owning the name could restart), the handlers are also invoked. If the GDBus::Connection that is used for watching the name disconnects, then name_vanished_handler is invoked since it is no longer possible to access the name.
Another guarantee is that invocations of name_appeared_handler and name_vanished_handler are guaranteed to alternate; that is, if name_appeared_handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be name_vanished_handler. The reverse is also true.
This behavior makes it very simple to write applications that want to take action when a certain [name exists][gdbus-watching-names]. Basically, the application should create object proxies in name_appeared_handler and destroy them again (if any) in name_vanished_handler. g_bus_unwatch_name() to stop watching the name.
#bus_watch_name_on_connection(connection, name, flags, name_appeared_handler, name_vanished_handler, user_data, user_data_free_func) ⇒ Integer
Like g_bus_watch_name() but takes a GDBus::Connection instead of a GBus::Type. g_bus_unwatch_name() to stop watching the name.
#bus_watch_name_on_connection_with_closures(connection, name, flags, name_appeared_closure, name_vanished_closure) ⇒ Integer
Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages. to exist or nil. to not exist or nil. g_bus_unwatch_name() to stop watching the name.
#bus_watch_name_with_closures(bus_type, name, flags, name_appeared_closure, name_vanished_closure) ⇒ Integer
Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages. to exist or nil. to not exist or nil. g_bus_unwatch_name() to stop watching the name.
#content_type_can_be_executable(type) ⇒ Boolean
Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files).
#content_type_equals(type1, type2) ⇒ Boolean
Compares two content types for equality.
#content_type_from_mime_type(mime_type) ⇒ String
Tries to find a content type based on the mime type name.
#content_type_get_description(type) ⇒ String
Gets the human readable description of the content type.
#content_type_get_generic_icon_name(type) ⇒ String
Gets the generic icon name for a content type.
See the shared-mime-info specification for more on the generic icon name.
#content_type_get_icon(type) ⇒ Gio::Icon
Gets the icon for a content type.
#content_type_get_mime_dirs ⇒ Array<String>
Get the list of directories which MIME data is loaded from. See g_content_type_set_mime_dirs() for details.
#content_type_get_mime_type(type) ⇒ String
Gets the mime type for the content type, if one is registered.
#content_type_get_symbolic_icon(type) ⇒ Gio::Icon
Gets the symbolic icon for a content type.
#content_type_guess(filename, data, data_size, result_uncertain) ⇒ String
Guesses the content type based on example data. If the function is uncertain, result_uncertain will be set to true. Either filename or data may be nil, in which case the guess will be based solely on the other argument.
#content_type_guess_for_tree(root) ⇒ Array<String>
Tries to guess the type of the tree with root root, by looking at the files it contains. The result is an array of content types, with the best guess coming first.
The types returned all have the form x-content/foo, e.g. x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a camera memory card). See the shared-mime-info specification for more on x-content types.
This function is useful in the implementation of g_mount_guess_content_type().
#content_type_is_a(type, supertype) ⇒ Boolean
Determines if type is a subset of supertype.
#content_type_is_mime_type(type, mime_type) ⇒ Boolean
Determines if type is a subset of mime_type. Convenience wrapper around g_content_type_is_a().
#content_type_is_unknown(type) ⇒ Boolean
Checks if the content type is the generic "unknown" type. On UNIX this is the "application/octet-stream" mimetype, while on win32 it is "*" and on OSX it is a dynamic type or octet-stream.
#content_type_set_mime_dirs(dirs) ⇒ nil
Set the list of directories used by GIO to load the MIME database. If dirs is nil, the directories used are the default:
- the
mimesubdirectory of the directory in$XDG_DATA_HOME - the
mimesubdirectory of every directory in$XDG_DATA_DIRS
This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data.
Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they depend on the system’s MIME database, you should call this function with dirs set to nil before calling g_test_init(), for instance:
// Load MIME data from the system
g_content_type_set_mime_dirs (NULL);
// Isolate the environment
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
…
return g_test_run ();
#content_types_get_registered ⇒ GLib::List<String>
Gets a list of strings containing all the registered content types
known to the system. The list and its data should be freed using
g_list_free_full (list, g_free).
#dbus_address_escape_value(string) ⇒ String
Escape string so it can appear in a D-Bus address as the value part of a key-value pair.
For instance, if string is /run/bus-for-:0,
this function would return /run/bus-for-%3A0,
which could be used in a D-Bus address like
unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0.
#dbus_address_get_for_bus_sync(bus_type, cancellable) ⇒ String
Synchronously looks up the D-Bus address for the well-known message bus instance specified by bus_type. This may involve using various platform specific mechanisms.
The returned address will be in the D-Bus address format.
#dbus_address_get_stream(address, cancellable, callback, user_data) ⇒ nil
Asynchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. address must be in the D-Bus address format.
When the operation is finished, callback will be invoked. You can then call g_dbus_address_get_stream_finish() to get the result of the operation.
This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version.
#dbus_address_get_stream_finish(res, out_guid) ⇒ Gio::IOStream
Finishes an operation started with g_dbus_address_get_stream().
A server is not required to set a GUID, so out_guid may be set to nil even on success.
#dbus_address_get_stream_sync(address, out_guid, cancellable) ⇒ Gio::IOStream
Synchronously connects to an endpoint specified by address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. address must be in the D-Bus address format.
A server is not required to set a GUID, so out_guid may be set to nil even on success.
This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version.
#dbus_annotation_info_lookup(annotations, name) ⇒ String
Looks up the value of an annotation.
The cost of this function is O(n) in number of annotations.
#dbus_error_encode_gerror(error) ⇒ String
Creates a D-Bus error name to use for error. If error matches a registered error (cf. g_dbus_error_register_error()), the corresponding D-Bus error name will be returned.
Otherwise the a name of the form
org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE
will be used. This allows other GDBus applications to map the error
on the wire back to a #GError using g_dbus_error_new_for_dbus_error().
This function is typically only used in object mappings to put a #GError on the wire. Regular applications should not use it.
#dbus_error_get_remote_error(error) ⇒ String
Gets the D-Bus error name used for error, if any.
This function is guaranteed to return a D-Bus error name for all #GErrors returned from functions handling remote method calls (e.g. g_dbus_connection_call_finish()) unless g_dbus_error_strip_remote_error() has been used on error.
#dbus_error_is_remote_error(error) ⇒ Boolean
Checks if error represents an error received via D-Bus from a remote peer. If so, use g_dbus_error_get_remote_error() to get the name of the error. false otherwise.
#dbus_error_new_for_dbus_error(dbus_error_name, dbus_error_message) ⇒ GLib::Error
Creates a #GError based on the contents of dbus_error_name and dbus_error_message.
Errors registered with g_dbus_error_register_error() will be looked up using dbus_error_name and if a match is found, the error domain and code is used. Applications can use g_dbus_error_get_remote_error() to recover dbus_error_name.
If a match against a registered error is not found and the D-Bus error name is in a form as returned by g_dbus_error_encode_gerror() the error domain and code encoded in the name is used to create the #GError. Also, dbus_error_name is added to the error message such that it can be recovered with g_dbus_error_get_remote_error().
Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR in the %G_IO_ERROR error domain is returned. Also, dbus_error_name is added to the error message such that it can be recovered with g_dbus_error_get_remote_error().
In all three cases, dbus_error_name can always be recovered from the returned #GError using the g_dbus_error_get_remote_error() function (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).
This function is typically only used in object mappings to prepare #GError instances for applications. Regular applications should not use it.
#dbus_error_quark ⇒ GLib::Quark
#dbus_error_register_error(error_domain, error_code, dbus_error_name) ⇒ Boolean
Creates an association to map between dbus_error_name and #GErrors specified by error_domain and error_code.
This is typically done in the routine that returns the #GQuark for an error domain. exists.
#dbus_error_register_error_domain(error_domain_quark_name, quark_volatile, entries, num_entries) ⇒ nil
Helper function for associating a #GError error domain with D-Bus error names.
While quark_volatile has a volatile qualifier, this is a historical
artifact and the argument passed to it should not be volatile.
#dbus_error_strip_remote_error(error) ⇒ Boolean
Looks for extra information in the error message used to recover the D-Bus error name and strips it if found. If stripped, the message field in error will correspond exactly to what was received on the wire.
This is typically used when presenting errors to the end user.
#dbus_error_unregister_error(error_domain, error_code, dbus_error_name) ⇒ Boolean
Destroys an association previously set up with g_dbus_error_register_error().
#dbus_escape_object_path(s) ⇒ String
This is a language binding friendly version of g_dbus_escape_object_path_bytestring().
#dbus_escape_object_path_bytestring(bytes) ⇒ String
Escapes bytes for use in a D-Bus object path component. bytes is an array of zero or more nonzero bytes in an unspecified encoding, followed by a single zero byte.
The escaping method consists of replacing all non-alphanumeric
characters (see g_ascii_isalnum()) with their hexadecimal value
preceded by an underscore (_). For example:
foo.bar.baz will become foo_2ebar_2ebaz.
This method is appropriate to use when the input is nearly a valid object path component but is not when your input is far from being a valid object path component. Other escaping algorithms are also valid to use with D-Bus object paths.
This can be reversed with g_dbus_unescape_object_path().
#dbus_generate_guid ⇒ String
Generate a D-Bus GUID that can be used with e.g. g_dbus_connection_new().
See the D-Bus specification regarding what strings are valid D-Bus GUIDs. The specification refers to these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as ‘GUIDs’. The terms are interchangeable.
Note that D-Bus GUIDs do not follow RFC 4122.
#dbus_gvalue_to_gvariant(gvalue, type) ⇒ GLib::Variant
Converts a #GValue to a #GVariant of the type indicated by the type parameter.
The conversion is using the following rules:
G_TYPE_STRING: 's', 'o', 'g' or 'ay'G_TYPE_STRV: 'as', 'ao' or 'aay'G_TYPE_BOOLEAN: 'b'G_TYPE_UCHAR: 'y'G_TYPE_INT: 'i', 'n'G_TYPE_UINT: 'u', 'q'G_TYPE_INT64: 'x'G_TYPE_UINT64: 't'G_TYPE_DOUBLE: 'd'G_TYPE_VARIANT: Any GVariant::Type
This can fail if e.g. gvalue is of type %G_TYPE_STRING and type is 'i', i.e. %G_VARIANT_TYPE_INT32. It will also fail for any #GType (including e.g. %G_TYPE_OBJECT and %G_TYPE_BOXED derived-types) not in the table above.
Note that if gvalue is of type %G_TYPE_VARIANT and its value is nil, the empty #GVariant instance (never nil) for type is returned (e.g. 0 for scalar types, the empty string for string types, '/' for object path types, the empty array for any array type and so on).
See the g_dbus_gvariant_to_gvalue() function for how to convert a #GVariant to a #GValue.
#dbus_gvariant_to_gvalue(value, out_gvalue) ⇒ nil
Converts a #GVariant to a #GValue. If value is floating, it is consumed.
The rules specified in the g_dbus_gvalue_to_gvariant() function are used - this function is essentially its reverse form. So, a #GVariant containing any basic or string array type will be converted to a #GValue containing a basic value or string array. Any other #GVariant (handle, variant, tuple, dict entry) will be converted to a #GValue containing that #GVariant.
The conversion never fails - a valid #GValue is always returned in out_gvalue.
#dbus_is_address(string) ⇒ Boolean
Checks if string is a D-Bus address.
This doesn't check if string is actually supported by GDBus::Server or GDBus::Connection - use g_dbus_is_supported_address() to do more checks.
#dbus_is_error_name(string) ⇒ Boolean
Check whether string is a valid D-Bus error name.
This function returns the same result as g_dbus_is_interface_name(), because D-Bus error names are defined to have exactly the same syntax as interface names.
#dbus_is_guid(string) ⇒ Boolean
Checks if string is a D-Bus GUID.
See the documentation for g_dbus_generate_guid() for more information about the format of a GUID.
#dbus_is_interface_name(string) ⇒ Boolean
Checks if string is a valid D-Bus interface name.
#dbus_is_member_name(string) ⇒ Boolean
Checks if string is a valid D-Bus member (e.g. signal or method) name.
#dbus_is_name(string) ⇒ Boolean
Checks if string is a valid D-Bus bus name (either unique or well-known).
#dbus_is_supported_address(string) ⇒ Boolean
Like g_dbus_is_address() but also checks if the library supports the transports in string and that key/value pairs for each transport are valid. See the specification of the D-Bus address format. supported by this library, false if error is set.
#dbus_is_unique_name(string) ⇒ Boolean
Checks if string is a valid D-Bus unique bus name.
#dbus_unescape_object_path(s) ⇒ Array<Integer>
Unescapes an string that was previously escaped with g_dbus_escape_object_path(). If the string is in a format that could not have been returned by g_dbus_escape_object_path(), this function returns nil.
Encoding alphanumeric characters which do not need to be
encoded is not allowed (e.g _63 is not valid, the string
should contain c instead).
#dtls_client_connection_new(base_socket, server_identity) ⇒ Gio::DtlsClientConnection
Creates a new GDtls::ClientConnection wrapping base_socket which is assumed to communicate with the server identified by server_identity.
#dtls_server_connection_new(base_socket, certificate) ⇒ Gio::DtlsServerConnection
Creates a new GDtls::ServerConnection wrapping base_socket.
#file_new_build_filenamev(args) ⇒ Gio::File
Constructs a #GFile from a vector of elements using the correct separator for filenames.
Using this function is equivalent to calling g_build_filenamev(), followed by g_file_new_for_path() on the result.
#file_new_for_commandline_arg(arg) ⇒ Gio::File
Creates a #GFile with the given argument from the command line. The value of arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if arg points to a malformed path.
Note that on Windows, this function expects its argument to be in UTF-8 -- not the system code page. This means that you should not use this function with string from argv as it is passed to main(). g_win32_get_command_line() will return a UTF-8 version of the commandline. #GApplication also uses UTF-8 but g_application_command_line_create_file_for_arg() may be more useful for you there. It is also always possible to use this function with GOption::Context arguments of type %G_OPTION_ARG_FILENAME.
#file_new_for_commandline_arg_and_cwd(arg, cwd) ⇒ Gio::File
Creates a #GFile with the given argument from the command line.
This function is similar to g_file_new_for_commandline_arg() except that it allows for passing the current working directory as an argument instead of using the current working directory of the process.
This is useful if the commandline argument was given in a context other than the invocation of the current process.
See also g_application_command_line_create_file_for_arg().
#file_new_for_path(path) ⇒ Gio::File
Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if path is malformed.
#file_new_for_uri(uri) ⇒ Gio::File
Constructs a #GFile for a given URI. This operation never fails, but the returned object might not support any I/O operation if uri is malformed or if the uri type is not supported.
#file_new_tmp(tmpl, iostream) ⇒ Gio::File
Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a #GFile and GFile::IOStream pointing to it.
tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is nil, a default template is used.
Unlike the other #GFile constructors, this will return nil if a temporary file could not be created.
#file_new_tmp_async(tmpl, io_priority, cancellable, callback, user_data) ⇒ nil
Asynchronously opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_file_new_tmp().
tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is nil, a default template is used.
#file_new_tmp_dir_async(tmpl, io_priority, cancellable, callback, user_data) ⇒ nil
Asynchronously creates a directory in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().
tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is nil, a default template is used.
#file_new_tmp_dir_finish(result) ⇒ Gio::File
Finishes a temporary directory creation started by g_file_new_tmp_dir_async().
#file_new_tmp_finish(result, iostream) ⇒ Gio::File
Finishes a temporary file creation started by g_file_new_tmp_async().
#file_parse_name(parse_name) ⇒ Gio::File
Constructs a #GFile with the given parse_name (i.e. something given by g_file_get_parse_name()). This operation never fails, but the returned object might not support any I/O operation if the parse_name cannot be parsed.
#icon_deserialize(value) ⇒ Gio::Icon
Deserializes a #GIcon previously serialized using g_icon_serialize().
#icon_new_for_string(str) ⇒ Gio::Icon
Generate a #GIcon instance from str. This function can fail if str is not valid - see g_icon_to_string() for discussion.
If your application or library provides one or more #GIcon implementations you need to ensure that each #GType is registered with the type system prior to calling g_icon_new_for_string().
#initable_newv(object_type, n_parameters, parameters, cancellable) ⇒ GObject::Object
Helper function for constructing #GInitable object. This is similar to g_object_newv() but also initializes the object and returns nil, setting an error on failure.
#io_error_from_errno(err_no) ⇒ Gio::IOErrorEnum
Converts errno.h error codes into GIO error codes.
The fallback value %G_IO_ERROR_FAILED is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).
As errno is global and may be modified by intermediate function
calls, you should save its value immediately after the call returns,
and use the saved value instead of errno:
int saved_errno;
ret = read (blah);
saved_errno = errno;
g_io_error_from_errno (saved_errno);
#io_error_from_file_error(file_error) ⇒ Gio::IOErrorEnum
Converts GFile::Error error codes into GIO error codes.
#io_error_quark ⇒ GLib::Quark
Gets the GIO Error Quark.
#io_extension_point_implement(extension_point_name, type, extension_name, priority) ⇒ Gio::IOExtension
Registers type as extension for the extension point with name extension_point_name.
If type has already been registered as an extension for this extension point, the existing #GIOExtension object is returned.
#io_extension_point_lookup(name) ⇒ Gio::IOExtensionPoint
Looks up an existing extension point.
#io_extension_point_register(name) ⇒ Gio::IOExtensionPoint
Registers an extension point.
#io_modules_load_all_in_directory(dirname) ⇒ GLib::List<Gio::IOModule>
Loads all the modules in the specified directory.
If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.
#io_modules_load_all_in_directory_with_scope(dirname, scope) ⇒ GLib::List<Gio::IOModule>
Loads all the modules in the specified directory.
If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.
#io_modules_scan_all_in_directory(dirname) ⇒ nil
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name().
If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().
#io_modules_scan_all_in_directory_with_scope(dirname, scope) ⇒ nil
Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.
This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name().
If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().
#io_scheduler_cancel_all_jobs ⇒ nil
Cancels all cancellable I/O jobs.
A job is cancellable if a #GCancellable was passed into g_io_scheduler_push_job().
#io_scheduler_push_job(job_func, user_data, notify, io_priority, cancellable) ⇒ nil
Schedules the I/O job to run in another thread.
notify will be called on user_data after job_func has returned, regardless whether the job was cancelled or has run to completion.
If cancellable is not nil, it can be used to cancel the I/O job by calling g_cancellable_cancel() or by calling g_io_scheduler_cancel_all_jobs(). of the request.
#keyfile_settings_backend_new(filename, root_path, root_group) ⇒ Gio::SettingsBackend
Creates a keyfile-backed GSettings::Backend.
The filename of the keyfile to use is given by filename.
All settings read to or written from the backend must fall under the path given in root_path (which must start and end with a slash and not contain two consecutive slashes). root_path may be "/".
If root_group is non-nil then it specifies the name of the keyfile group used for keys that are written directly below root_path. For example, if root_path is "/apps/example/" and root_group is "toplevel", then settings the key "/apps/example/enabled" to a value of true will cause the following to appear in the keyfile:
|[ [toplevel] enabled=true ]|
If root_group is nil then it is not permitted to store keys directly below the root_path.
For keys not stored directly below root_path (ie: in a sub-path), the name of the subpath (with the final slash stripped) is used as the name of the keyfile group. To continue the example, if "/apps/example/profiles/default/font-size" were set to 12 then the following would appear in the keyfile:
|[ [profiles/default] font-size=12 ]|
The backend will refuse writes (and return writability as being false) for keys outside of root_path and, in the event that root_group is nil, also for keys directly under root_path. Writes will also be refused if the backend detects that it has the inability to rewrite the keyfile (ie: the containing directory is not writable).
There is no checking done for your key namespace clashing with the syntax of the key file format. For example, if you have '[' or ']' characters in your path names or '=' in your key names you may be in trouble.
The backend reads default values from a keyfile called defaults in
the directory specified by the GKeyfile::SettingsBackend:defaults-dir property,
and a list of locked keys from a text file with the name locks in
the same location.
#memory_monitor_dup_default ⇒ Gio::MemoryMonitor
Gets a reference to the default GMemory::Monitor for the system.
#memory_settings_backend_new ⇒ Gio::SettingsBackend
Creates a memory-backed GSettings::Backend.
This backend allows changes to settings, but does not write them to any backing storage, so the next time you run your application, the memory backend will start out with the default values again.
#network_monitor_get_default ⇒ Gio::NetworkMonitor
Gets the default GNetwork::Monitor for the system.
#networking_init ⇒ nil
Initializes the platform networking libraries (eg, on Windows, this calls WSAStartup()). GLib will call this itself if it is needed, so you only need to call it if you directly call system networking functions (without calling any GLib networking functions first).
#null_settings_backend_new ⇒ Gio::SettingsBackend
Creates a readonly GSettings::Backend.
This backend does not allow changes to settings, so all settings will always have their default values.
#pollable_source_new(pollable_stream) ⇒ GLib::Source
Utility method for GPollable::InputStream and #GPollableOutputStream implementations. Creates a new #GSource that expects a callback of type GPollable::SourceFunc. The new source does not actually do anything on its own; use g_source_add_child_source() to add other sources to it to cause it to trigger.
#pollable_source_new_full(pollable_stream, child_source, cancellable) ⇒ GLib::Source
Utility method for GPollable::InputStream and #GPollableOutputStream implementations. Creates a new #GSource, as with g_pollable_source_new(), but also attaching child_source (with a dummy callback), and cancellable, if they are non-nil.
#pollable_stream_read(stream, buffer, count, blocking, cancellable) ⇒ Gio::gssize
Tries to read from stream, as with g_input_stream_read() (if blocking is true) or g_pollable_input_stream_read_nonblocking() (if blocking is false). This can be used to more easily share code between blocking and non-blocking implementations of a method.
If blocking is false, then stream must be a GPollable::InputStream for which g_pollable_input_stream_can_poll() returns true, or else the behavior is undefined. If blocking is true, then stream does not need to be a GPollable::InputStream.
#pollable_stream_write(stream, buffer, count, blocking, cancellable) ⇒ Gio::gssize
Tries to write to stream, as with g_output_stream_write() (if blocking is true) or g_pollable_output_stream_write_nonblocking() (if blocking is false). This can be used to more easily share code between blocking and non-blocking implementations of a method.
If blocking is false, then stream must be a GPollable::OutputStream for which g_pollable_output_stream_can_poll() returns true or else the behavior is undefined. If blocking is true, then stream does not need to be a GPollable::OutputStream.
#pollable_stream_write_all(stream, buffer, count, blocking, bytes_written, cancellable) ⇒ Boolean
Tries to write count bytes to stream, as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write().
On a successful write of count bytes, true is returned, and bytes_written is set to count.
If there is an error during the operation (including %G_IO_ERROR_WOULD_BLOCK in the non-blocking case), false is returned and error is set to indicate the error status, bytes_written is updated to contain the number of bytes written into the stream before the error occurred.
As with g_pollable_stream_write(), if blocking is false, then stream must be a GPollable::OutputStream for which g_pollable_output_stream_can_poll() returns true or else the behavior is undefined. If blocking is true, then stream does not need to be a GPollable::OutputStream.
#power_profile_monitor_dup_default ⇒ Gio::PowerProfileMonitor
Gets a reference to the default GPower::ProfileMonitor for the system.
#proxy_get_default_for_protocol(protocol) ⇒ Gio::Proxy
Find the gio-proxy extension point for a proxy implementation that supports
the specified protocol.
#proxy_resolver_get_default ⇒ Gio::ProxyResolver
Gets the default GProxy::Resolver for the system.
#resolver_error_quark ⇒ GLib::Quark
Gets the #GResolver Error Quark.
#resource_error_quark ⇒ GLib::Quark
Gets the #GResource Error Quark.
#resource_load(filename) ⇒ Gio::Resource
Loads a binary resource bundle and creates a #GResource representation of it, allowing you to query it for data.
If you want to use this resource in the global resource namespace you need to register it with g_resources_register().
If filename is empty or the data in it is corrupt, %G_RESOURCE_ERROR_INTERNAL will be returned. If filename doesn’t exist, or there is an error in reading it, an error from g_mapped_file_new() will be returned.
#resources_enumerate_children(path, lookup_flags) ⇒ Array<String>
Returns all the names of children at the specified path in the set of globally registered resources. The return result is a nil terminated list of strings which should be released with g_strfreev().
lookup_flags controls the behaviour of the lookup.
#resources_get_info(path, lookup_flags, size, flags) ⇒ Boolean
Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.
lookup_flags controls the behaviour of the lookup.
#resources_lookup_data(path, lookup_flags) ⇒ GLib::Bytes
Looks for a file at the specified path in the set of globally registered resources and returns a #GBytes that lets you directly access the data in memory.
The data is always followed by a zero byte, so you can safely use the data as a C string. However, that byte is not included in the size of the GBytes.
For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some readonly data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.
lookup_flags controls the behaviour of the lookup.
#resources_open_stream(path, lookup_flags) ⇒ Gio::InputStream
Looks for a file at the specified path in the set of globally registered resources and returns a GInput::Stream that lets you read the data.
lookup_flags controls the behaviour of the lookup.
#resources_register(resource) ⇒ nil
Registers the resource with the process-global set of resources. Once a resource is registered the files in it can be accessed with the global resource lookup functions like g_resources_lookup_data().
#resources_unregister(resource) ⇒ nil
Unregisters the resource from the process-global set of resources.
#settings_schema_source_get_default ⇒ Gio::SettingsSchemaSource
Gets the default system schema source.
This function is not required for normal uses of #GSettings but it may be useful to authors of plugin management systems or to those who want to introspect the content of schemas.
If no schemas are installed, nil will be returned.
The returned source may actually consist of multiple schema sources
from different directories, depending on which directories were given
in XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this reason, all
lookups performed against the default source should probably be done
recursively.
#simple_async_report_error_in_idle(object, callback, user_data, domain, code, format, array) ⇒ nil
Reports an error in an asynchronous function in an idle function by directly setting the contents of the GAsync::Result with the given error information.
#simple_async_report_gerror_in_idle(object, callback, user_data, error) ⇒ nil
Reports an error in an idle function. Similar to g_simple_async_report_error_in_idle(), but takes a #GError rather than building a new one.
#simple_async_report_take_gerror_in_idle(object, callback, user_data, error) ⇒ nil
Reports an error in an idle function. Similar to g_simple_async_report_gerror_in_idle(), but takes over the caller's ownership of error, so the caller does not have to free it any more.
#srv_target_list_sort(targets) ⇒ GLib::List<GObject>
Sorts targets in place according to the algorithm in RFC 2782.
#tls_backend_get_default ⇒ Gio::TlsBackend
Gets the default GTls::Backend for the system.
#tls_channel_binding_error_quark ⇒ GLib::Quark
Gets the TLS channel binding error quark.
#tls_client_connection_new(base_io_stream, server_identity) ⇒ Gio::TlsClientConnection
Creates a new GTls::ClientConnection wrapping base_io_stream (which must have pollable input and output streams) which is assumed to communicate with the server identified by server_identity.
See the documentation for GTls::Connection:base-io-stream for restrictions on when application code can run operations on the base_io_stream after this function has returned. GTls::ClientConnection, or nil on error
#tls_error_quark ⇒ GLib::Quark
Gets the TLS error quark.
#tls_file_database_new(anchors) ⇒ Gio::TlsFileDatabase
Creates a new GTls::FileDatabase which uses anchor certificate authorities in anchors to verify certificate chains.
The certificates in anchors must be PEM encoded. GTls::FileDatabase, or nil on error
#tls_server_connection_new(base_io_stream, certificate) ⇒ Gio::TlsServerConnection
Creates a new GTls::ServerConnection wrapping base_io_stream (which must have pollable input and output streams).
See the documentation for GTls::Connection:base-io-stream for restrictions on when application code can run operations on the base_io_stream after this function has returned. GTls::ServerConnection, or nil on error
#unix_is_mount_path_system_internal(mount_path) ⇒ Boolean
Determines if mount_path is considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user.
#unix_is_system_device_path(device_path) ⇒ Boolean
Determines if device_path is considered a block device path which is only
used in implementation of the OS. This is primarily used for hiding
mounted volumes that are intended as APIs for programs to read, and system
administrators at a shell; rather than something that should, for example,
appear in a GUI. For example, the Linux /proc filesystem.
The list of device paths considered ‘system’ ones may change over time.
#unix_is_system_fs_type(fs_type) ⇒ Boolean
Determines if fs_type is considered a type of file system which is only
used in implementation of the OS. This is primarily used for hiding
mounted volumes that are intended as APIs for programs to read, and system
administrators at a shell; rather than something that should, for example,
appear in a GUI. For example, the Linux /proc filesystem.
The list of file system types considered ‘system’ ones may change over time.
#unix_mount_at(mount_path, time_read) ⇒ Gio::UnixMountEntry
Gets a GUnix::MountEntry for a given mount path. If time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mounts_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return nil if there is no mount point at mount_path.
#unix_mount_compare(mount1, mount2) ⇒ Integer
Compares two unix mounts. or less than mount2, respectively.
#unix_mount_copy(mount_entry) ⇒ Gio::UnixMountEntry
Makes a copy of mount_entry.
#unix_mount_for(file_path, time_read) ⇒ Gio::UnixMountEntry
Gets a GUnix::MountEntry for a given file path. If time_read is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mounts_changed_since().
If more mounts have the same mount path, the last matching mount is returned.
This will return nil if looking up the mount entry fails, if file_path doesn’t exist or there is an I/O error.
#unix_mount_free(mount_entry) ⇒ nil
Frees a unix mount.
#unix_mount_get_device_path(mount_entry) ⇒ Gio::filename
Gets the device path for a unix mount.
#unix_mount_get_fs_type(mount_entry) ⇒ String
Gets the filesystem type for the unix mount.
#unix_mount_get_mount_path(mount_entry) ⇒ Gio::filename
Gets the mount path for a unix mount.
#unix_mount_get_options(mount_entry) ⇒ String
Gets a comma-separated list of mount options for the unix mount. For example,
rw,relatime,seclabel,data=ordered.
This is similar to g_unix_mount_point_get_options(), but it takes a GUnix::MountEntry as an argument. available.
#unix_mount_get_root_path(mount_entry) ⇒ String
Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.
For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar".
#unix_mount_guess_can_eject(mount_entry) ⇒ Boolean
Guesses whether a Unix mount can be ejected.
#unix_mount_guess_icon(mount_entry) ⇒ Gio::Icon
Guesses the icon of a Unix mount.
#unix_mount_guess_name(mount_entry) ⇒ String
Guesses the name of a Unix mount. The result is a translated string.
#unix_mount_guess_should_display(mount_entry) ⇒ Boolean
Guesses whether a Unix mount should be displayed in the UI.
#unix_mount_guess_symbolic_icon(mount_entry) ⇒ Gio::Icon
Guesses the symbolic icon of a Unix mount.
#unix_mount_is_readonly(mount_entry) ⇒ Boolean
Checks if a unix mount is mounted read only.
#unix_mount_is_system_internal(mount_entry) ⇒ Boolean
Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() on mount_entry’s properties.
The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored.
#unix_mount_point_at(mount_path, time_read) ⇒ Gio::UnixMountPoint
Gets a GUnix::MountPoint for a given mount path. If time_read is set, it will be filled with a unix timestamp for checking if the mount points have changed since with g_unix_mount_points_changed_since().
If more mount points have the same mount path, the last matching mount point is returned. is found.
#unix_mount_points_changed_since(time) ⇒ Boolean
Checks if the unix mount points have changed since a given unix time.
#unix_mount_points_get(time_read) ⇒ GLib::List<Gio::UnixMountPoint>
Gets a #GList of GUnix::MountPoint containing the unix mount points. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_points_changed_since().
#unix_mounts_changed_since(time) ⇒ Boolean
Checks if the unix mounts have changed since a given unix time.
#unix_mounts_get(time_read) ⇒ GLib::List<Gio::UnixMountEntry>
Gets a #GList of GUnix::MountEntry containing the unix mounts. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mounts_changed_since().