Class Gio

java.lang.Object
org.gnome.gio.Gio

@Generated("org.javagi.JavaGI") public final class Gio extends Object
Constants and functions that are declared in the global Gio namespace.
  • Field Details

    • DBUS_METHOD_INVOCATION_HANDLED

      public static final boolean DBUS_METHOD_INVOCATION_HANDLED

      The value returned by handlers of the signals generated by the gdbus-codegen tool 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
      
      Since:
      2.68
      See Also:
    • DBUS_METHOD_INVOCATION_UNHANDLED

      public static final boolean DBUS_METHOD_INVOCATION_UNHANDLED

      The value returned by handlers of the signals generated by the gdbus-codegen tool 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.

      Since:
      2.68
      See Also:
    • DEBUG_CONTROLLER_EXTENSION_POINT_NAME

      public static final String DEBUG_CONTROLLER_EXTENSION_POINT_NAME
      Extension point for debug control functionality. See Extending GIO.
      Since:
      2.72
      See Also:
    • DRIVE_IDENTIFIER_KIND_UNIX_DEVICE

      public static final String DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
      The string used to obtain a Unix device path with g_drive_get_identifier().
      Since:
      2.58
      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_DELETE

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_DELETE

      A key in the "access" namespace for checking deletion privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to delete the file.

      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE

      A key in the "access" namespace for getting execution privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to execute the file.

      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_READ

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_READ

      A key in the "access" namespace for getting read privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to read the file.

      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_RENAME

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_RENAME

      A key in the "access" namespace for checking renaming privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to rename the file.

      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_TRASH

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_TRASH

      A key in the "access" namespace for checking trashing privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to move the file to the trash.

      See Also:
    • FILE_ATTRIBUTE_ACCESS_CAN_WRITE

      public static final String FILE_ATTRIBUTE_ACCESS_CAN_WRITE

      A key in the "access" namespace for getting write privileges.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      This attribute will be true if the user is able to write to the file.

      See Also:
    • FILE_ATTRIBUTE_DOS_IS_ARCHIVE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.60
      See Also:
    • FILE_ATTRIBUTE_DOS_IS_SYSTEM

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      Since:
      2.60
      See Also:
    • FILE_ATTRIBUTE_ETAG_VALUE

      public static final String FILE_ATTRIBUTE_ETAG_VALUE

      A key in the "etag" namespace for getting the value of the file's entity tag.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_FREE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT64.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_READONLY

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_REMOTE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_SIZE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT64.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_TYPE

      public static final String FILE_ATTRIBUTE_FILESYSTEM_TYPE

      A key in the "filesystem" namespace for getting the file system's type.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_USED

      public static final String FILE_ATTRIBUTE_FILESYSTEM_USED

      A key in the "filesystem" namespace for getting the number of bytes used by data on the file system.

      Corresponding GFileAttributeType is FileAttributeType.UINT64.

      Since:
      2.32
      See Also:
    • FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW

      public static final String 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 GFilesystemPreviewType.

      See Also:
    • FILE_ATTRIBUTE_GVFS_BACKEND

      public static final String FILE_ATTRIBUTE_GVFS_BACKEND

      A key in the "gvfs" namespace that gets the name of the current GVFS backend in use.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_ID_FILE

      public static final String FILE_ATTRIBUTE_ID_FILE

      A key in the "id" namespace for getting a file identifier.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      An example use would be during listing files, to avoid recursive directory scanning.

      For local files on Linux, this is a combination of the file’s device number and inode, so is invariant with respect to hard linking. The format used by other VFS implementations may vary, and some VFS backends may not set it.

      For simply seeing if two File instances refer to the same path on disk, see File.equal(File).

      See Also:
    • FILE_ATTRIBUTE_ID_FILESYSTEM

      public static final String FILE_ATTRIBUTE_ID_FILESYSTEM

      A key in the "id" namespace for getting the file system identifier.

      Corresponding GFileAttributeType is FileAttributeType.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).

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_START

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI

      public static final String FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI

      A key in the "mountable" namespace for getting the HAL UDI for the mountable file.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE

      public static final String FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE

      A key in the "mountable" namespace for getting the GDriveStartStopType.

      Corresponding GFileAttributeType is FileAttributeType.UINT32.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE

      public static final String FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE

      A key in the "mountable" namespace for getting the unix device.

      Corresponding GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE

      public static final String FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE

      A key in the "mountable" namespace for getting the unix device file.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      Since:
      2.22
      See Also:
    • FILE_ATTRIBUTE_OWNER_GROUP

      public static final String FILE_ATTRIBUTE_OWNER_GROUP

      A key in the "owner" namespace for getting the file owner's group.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_OWNER_USER

      public static final String FILE_ATTRIBUTE_OWNER_USER

      A key in the "owner" namespace for getting the user name of the file's owner.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_OWNER_USER_REAL

      public static final String FILE_ATTRIBUTE_OWNER_USER_REAL

      A key in the "owner" namespace for getting the real name of the user that owns the file.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_PREVIEW_ICON

      public static final String 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 GFileAttributeType is FileAttributeType.OBJECT.

      The value for this key should contain a GIcon.

      Since:
      2.20
      See Also:
    • FILE_ATTRIBUTE_RECENT_MODIFIED

      public static final String 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 GFileAttributeType is FileAttributeType.INT64.

      Since:
      2.52
      See Also:
    • FILE_ATTRIBUTE_SELINUX_CONTEXT

      public static final String FILE_ATTRIBUTE_SELINUX_CONTEXT

      A key in the "selinux" namespace for getting the file's SELinux context.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      Note that this attribute is only available if GLib has been built with SELinux support.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT64.

      Since:
      2.20
      See Also:
    • FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE

      public static final String FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE

      A key in the "standard" namespace for getting the content type of the file.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      The value for this key should contain a valid content type.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_COPY_NAME

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_DESCRIPTION

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_EDIT_NAME

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_ICON

      public static final String FILE_ATTRIBUTE_STANDARD_ICON

      A key in the "standard" namespace for getting the icon for the file.

      Corresponding GFileAttributeType is FileAttributeType.OBJECT.

      The value for this key should contain a GIcon.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_IS_BACKUP

      public static final String FILE_ATTRIBUTE_STANDARD_IS_BACKUP

      A key in the "standard" namespace for checking if a file is a backup file.

      The exact semantics of what constitutes a backup file are backend-specific. For local files, a file is considered a backup if its name ends with ~ and it is a regular file. This follows the POSIX convention used by text editors such as Emacs.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_IS_HIDDEN

      public static final String FILE_ATTRIBUTE_STANDARD_IS_HIDDEN

      A key in the "standard" namespace for checking if a file is hidden.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL

      public static final String FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL

      A key in the "standard" namespace for checking if a file is virtual.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_IS_VOLATILE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.46
      See Also:
    • FILE_ATTRIBUTE_STANDARD_NAME

      public static final String 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 GFileAttributeType is FileAttributeType.BYTE_STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_SIZE

      public static final String FILE_ATTRIBUTE_STANDARD_SIZE

      A key in the "standard" namespace for getting the file's size (in bytes).

      Corresponding GFileAttributeType is FileAttributeType.UINT64.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_SORT_ORDER

      public static final String FILE_ATTRIBUTE_STANDARD_SORT_ORDER

      A key in the "standard" namespace for setting the sort order of a file.

      Corresponding GFileAttributeType is FileAttributeType.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.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON

      public static final String FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON

      A key in the "standard" namespace for getting the symbolic icon for the file.

      Corresponding GFileAttributeType is FileAttributeType.OBJECT.

      The value for this key should contain a GIcon.

      Since:
      2.34
      See Also:
    • FILE_ATTRIBUTE_STANDARD_TARGET_URI

      public static final String FILE_ATTRIBUTE_STANDARD_TARGET_URI

      A key in the "standard" namespace for getting the target URI for the file, in the case of FileType.SHORTCUT or FileType.MOUNTABLE files.

      Corresponding GFileAttributeType is FileAttributeType.STRING.

      See Also:
    • FILE_ATTRIBUTE_STANDARD_TYPE

      public static final String FILE_ATTRIBUTE_STANDARD_TYPE

      A key in the "standard" namespace for storing file types.

      Corresponding GFileAttributeType is FileAttributeType.UINT32.

      The value for this key should contain a GFileType.

      See Also:
    • FILE_ATTRIBUTE_THUMBNAILING_FAILED

      public static final String FILE_ATTRIBUTE_THUMBNAILING_FAILED

      A key in the "thumbnail" namespace for checking if thumbnailing failed.

      This attribute is true if thumbnailing failed.

      Corresponding GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_IS_VALID

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.40
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_PATH

      public static final String FILE_ATTRIBUTE_THUMBNAIL_PATH

      A key in the "thumbnail" namespace for getting the path to the thumbnail image with the biggest size available.

      Corresponding GFileAttributeType is FileAttributeType.BYTE_STRING.

      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE

      public static final String FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE

      A key in the "thumbnail" namespace for getting the path to the large thumbnail image.

      Corresponding GFileAttributeType is FileAttributeType.BYTE_STRING.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL

      public static final String FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL

      A key in the "thumbnail" namespace for getting the path to the normal thumbnail image.

      Corresponding GFileAttributeType is FileAttributeType.BYTE_STRING.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE

      public static final String FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE

      A key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.

      Corresponding GFileAttributeType is FileAttributeType.BYTE_STRING.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE

      public static final String FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE

      A key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.

      Corresponding GFileAttributeType is FileAttributeType.BYTE_STRING.

      Since:
      2.76
      See Also:
    • FILE_ATTRIBUTE_TIME_ACCESS

      public static final String FILE_ATTRIBUTE_TIME_ACCESS

      A key in the "time" namespace for getting the time the file was last accessed.

      Corresponding GFileAttributeType is FileAttributeType.UINT64, and contains the time since the file was last accessed, in seconds since the UNIX epoch.

      See Also:
    • FILE_ATTRIBUTE_TIME_ACCESS_NSEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.
      Since:
      2.74
      See Also:
    • FILE_ATTRIBUTE_TIME_ACCESS_USEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_TIME_CHANGED

      public static final String FILE_ATTRIBUTE_TIME_CHANGED

      A key in the "time" namespace for getting the time the file was last changed.

      Corresponding GFileAttributeType is FileAttributeType.UINT64, and contains the time since the file was last changed, in seconds since the UNIX epoch.

      This corresponds to the traditional UNIX ctime.

      See Also:
    • FILE_ATTRIBUTE_TIME_CHANGED_NSEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.
      Since:
      2.74
      See Also:
    • FILE_ATTRIBUTE_TIME_CHANGED_USEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_TIME_CREATED

      public static final String FILE_ATTRIBUTE_TIME_CREATED

      A key in the "time" namespace for getting the time the file was created.

      Corresponding GFileAttributeType is FileAttributeType.UINT64, and contains the time since the file was created, in seconds since the UNIX epoch.

      This may correspond to Linux stx_btime, FreeBSD st_birthtim, NetBSD st_birthtime or NTFS ctime.

      See Also:
    • FILE_ATTRIBUTE_TIME_CREATED_NSEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.
      Since:
      2.74
      See Also:
    • FILE_ATTRIBUTE_TIME_CREATED_USEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_TIME_MODIFIED

      public static final String FILE_ATTRIBUTE_TIME_MODIFIED

      A key in the "time" namespace for getting the time the file was last modified.

      Corresponding GFileAttributeType is FileAttributeType.UINT64, and contains the time since the file was modified, in seconds since the UNIX epoch.

      See Also:
    • FILE_ATTRIBUTE_TIME_MODIFIED_NSEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.
      Since:
      2.74
      See Also:
    • FILE_ATTRIBUTE_TIME_MODIFIED_USEC

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_TRASH_DELETION_DATE

      public static final String 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 GFileAttributeType is FileAttributeType.STRING.

      Since:
      2.24
      See Also:
    • FILE_ATTRIBUTE_TRASH_ITEM_COUNT

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_TRASH_ORIG_PATH

      public static final String 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 GFileAttributeType is FileAttributeType.BYTE_STRING.

      Since:
      2.24
      See Also:
    • FILE_ATTRIBUTE_UNIX_BLOCKS

      public static final String 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 GFileAttributeType is FileAttributeType.UINT64.

      See Also:
    • FILE_ATTRIBUTE_UNIX_BLOCK_SIZE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_UNIX_DEVICE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_UNIX_GID

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_UNIX_INODE

      public static final String 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 GFileAttributeType is FileAttributeType.UINT64.

      See Also:
    • FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT

      public static final String 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 GFileAttributeType is FileAttributeType.BOOLEAN.

      See Also:
    • FILE_ATTRIBUTE_UNIX_MODE

      public static final String 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 the st_mode member of struct stat, and includes both the file type and permissions.

      This attribute is only available for UNIX file systems.

      Corresponding GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_UNIX_RDEV

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • FILE_ATTRIBUTE_UNIX_UID

      public static final String 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 GFileAttributeType is FileAttributeType.UINT32.

      See Also:
    • MEMORY_MONITOR_EXTENSION_POINT_NAME

      public static final String MEMORY_MONITOR_EXTENSION_POINT_NAME
      Extension point for memory usage monitoring functionality. See Extending GIO.
      Since:
      2.64
      See Also:
    • NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME

      public static final String NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME
      See Also:
    • NETWORK_MONITOR_EXTENSION_POINT_NAME

      public static final String NETWORK_MONITOR_EXTENSION_POINT_NAME
      Extension point for network status monitoring functionality. See Extending GIO.
      Since:
      2.30
      See Also:
    • POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME

      public static final String POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME
      Extension point for power profile usage monitoring functionality. See Extending GIO.
      Since:
      2.70
      See Also:
    • PROXY_EXTENSION_POINT_NAME

      public static final String PROXY_EXTENSION_POINT_NAME
      Extension point for proxy functionality. See Extending GIO.
      Since:
      2.26
      See Also:
    • PROXY_RESOLVER_EXTENSION_POINT_NAME

      public static final String PROXY_RESOLVER_EXTENSION_POINT_NAME
      Extension point for proxy resolving functionality. See Extending GIO.
      See Also:
    • SETTINGS_BACKEND_EXTENSION_POINT_NAME

      public static final String SETTINGS_BACKEND_EXTENSION_POINT_NAME
      Extension point for GSettingsBackend functionality.
      See Also:
    • TLS_BACKEND_EXTENSION_POINT_NAME

      public static final String TLS_BACKEND_EXTENSION_POINT_NAME
      Extension point for TLS functionality via GTlsBackend. See Extending GIO.
      See Also:
    • TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT

      public static final String TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT
      The purpose used to verify the client certificate in a TLS connection. Used by TLS servers.
      See Also:
    • TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER

      public static final String 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.
      See Also:
    • VFS_EXTENSION_POINT_NAME

      public static final String VFS_EXTENSION_POINT_NAME
      Extension point for GVfs functionality. See Extending GIO.
      See Also:
    • VOLUME_IDENTIFIER_KIND_CLASS

      public static final String VOLUME_IDENTIFIER_KIND_CLASS

      The string used to obtain the volume class with g_volume_get_identifier().

      Known volume classes include device, network, and loop. 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 network volumes under a "Network" heading and device volumes under a "Devices" heading.

      See Also:
    • VOLUME_IDENTIFIER_KIND_HAL_UDI

      @Deprecated public static final String VOLUME_IDENTIFIER_KIND_HAL_UDI
      Deprecated.
      Do not use, HAL is deprecated.
      The string used to obtain a Hal UDI with g_volume_get_identifier().
      See Also:
    • VOLUME_IDENTIFIER_KIND_LABEL

      public static final String VOLUME_IDENTIFIER_KIND_LABEL
      The string used to obtain a filesystem label with g_volume_get_identifier().
      See Also:
    • VOLUME_IDENTIFIER_KIND_NFS_MOUNT

      public static final String VOLUME_IDENTIFIER_KIND_NFS_MOUNT
      The string used to obtain a NFS mount with g_volume_get_identifier().
      See Also:
    • VOLUME_IDENTIFIER_KIND_UNIX_DEVICE

      public static final String VOLUME_IDENTIFIER_KIND_UNIX_DEVICE
      The string used to obtain a Unix device path with g_volume_get_identifier().
      See Also:
    • VOLUME_IDENTIFIER_KIND_UUID

      public static final String VOLUME_IDENTIFIER_KIND_UUID
      The string used to obtain a UUID with g_volume_get_identifier().
      See Also:
    • VOLUME_MONITOR_EXTENSION_POINT_NAME

      public static final String VOLUME_MONITOR_EXTENSION_POINT_NAME
      Extension point for volume monitor functionality. See Extending GIO.
      See Also:
  • Constructor Details

    • Gio

      public Gio()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • busGet

      public static void busGet(BusType busType, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback)

      Asynchronously connects to the message bus specified by busType.

      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.

      Parameters:
      busType - a GBusType
      cancellable - a GCancellable or null
      callback - a GAsyncReadyCallback to call when the request is satisfied
      Since:
      2.26
    • busGetFinish

      public static DBusConnection busGetFinish(AsyncResult res) throws GErrorException

      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 busType. 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 GDBusConnection object will (usually) have the GDBusConnection:exit-on-close property set to true.

      Parameters:
      res - a GAsyncResult obtained from the GAsyncReadyCallback passed to g_bus_get()
      Returns:
      a GDBusConnection or null if error is set. Free with g_object_unref().
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • busGetSync

      public static DBusConnection busGetSync(BusType busType, @Nullable Cancellable cancellable) throws GErrorException

      Synchronously connects to the message bus specified by busType. 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 busType, 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 busType. 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 GDBusConnection object will (usually) have the GDBusConnection:exit-on-close property set to true.

      Parameters:
      busType - a GBusType
      cancellable - a GCancellable or null
      Returns:
      a GDBusConnection or null if error is set. Free with g_object_unref().
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • busOwnNameOnConnection

      public static int busOwnNameOnConnection(DBusConnection connection, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure)
      Version of busOwnNameOnConnection(DBusConnection, String, Set, Closure, Closure) using closures instead of callbacks for easier binding in other languages.
      Parameters:
      connection - a bus connection
      name - the well-known name to own
      flags - a set of flags with ownership options
      nameAcquiredClosure - closure to invoke when name is acquired, or NULL to ignore
      nameLostClosure - closure to invoke when name is lost, or NULL to ignore
      Returns:
      an identifier (never 0) that can be used with busUnownName(int) to stop owning the name.
      Since:
      2.26
    • busOwnNameOnConnection

      public static int busOwnNameOnConnection(DBusConnection connection, String name, BusNameOwnerFlags flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure)
      Version of busOwnNameOnConnection(DBusConnection, String, Set, Closure, Closure) using closures instead of callbacks for easier binding in other languages.
      Parameters:
      connection - a bus connection
      name - the well-known name to own
      flags - a set of flags with ownership options
      nameAcquiredClosure - closure to invoke when name is acquired, or NULL to ignore
      nameLostClosure - closure to invoke when name is lost, or NULL to ignore
      Returns:
      an identifier (never 0) that can be used with busUnownName(int) to stop owning the name.
      Since:
      2.26
    • busOwnName

      public static int busOwnName(BusType busType, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure)
      Version of [funcGio.busOwnName using closures instead of callbacks for easier binding in other languages.
      Parameters:
      busType - the type of bus to own a name on
      name - the well-known name to own
      flags - a set of flags with ownership options
      busAcquiredClosure - closure to invoke when connected to the bus of type busType, or NULL to ignore
      nameAcquiredClosure - closure to invoke when name is acquired, or NULL to ignore
      nameLostClosure - closure to invoke when name is lost, or NULL to ignore
      Returns:
      an identifier (never 0) that can be used with busUnownName(int) to stop owning the name.
      Since:
      2.26
    • busOwnName

      public static int busOwnName(BusType busType, String name, BusNameOwnerFlags flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure)
      Version of [funcGio.busOwnName using closures instead of callbacks for easier binding in other languages.
      Parameters:
      busType - the type of bus to own a name on
      name - the well-known name to own
      flags - a set of flags with ownership options
      busAcquiredClosure - closure to invoke when connected to the bus of type busType, or NULL to ignore
      nameAcquiredClosure - closure to invoke when name is acquired, or NULL to ignore
      nameLostClosure - closure to invoke when name is lost, or NULL to ignore
      Returns:
      an identifier (never 0) that can be used with busUnownName(int) to stop owning the name.
      Since:
      2.26
    • busUnownName

      public static void busUnownName(int ownerId)

      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 GLib.MainContext after this function has returned. You should continue to iterate the GLib.MainContext until the GLib.DestroyNotify function passed to busOwnName(BusType, String, Set, Closure, Closure, Closure) is called, in order to avoid memory leaks through callbacks queued on the GLib.MainContext after it’s stopped being iterated.

      Parameters:
      ownerId - an identifier obtained from busOwnName(BusType, String, Set, Closure, Closure, Closure)
      Since:
      2.26
    • busUnwatchName

      public static void busUnwatchName(int watcherId)

      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 GMainContext after this function has returned. You should continue to iterate the GMainContext until the GDestroyNotify function passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on the GMainContext after it’s stopped being iterated.

      Parameters:
      watcherId - An identifier obtained from g_bus_watch_name()
      Since:
      2.26
    • busWatchNameOnConnection

      public static int busWatchNameOnConnection(DBusConnection connection, String name, Set<BusNameWatcherFlags> flags, @Nullable Closure nameAppearedClosure, @Nullable Closure nameVanishedClosure)
      Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.
      Parameters:
      connection - A GDBusConnection.
      name - The name (well-known or unique) to watch.
      flags - Flags from the GBusNameWatcherFlags enumeration.
      nameAppearedClosure - GClosure to invoke when name is known to exist or null.
      nameVanishedClosure - GClosure to invoke when name is known to not exist or null.
      Returns:
      An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
      Since:
      2.26
    • busWatchNameOnConnection

      public static int busWatchNameOnConnection(DBusConnection connection, String name, BusNameWatcherFlags flags, @Nullable Closure nameAppearedClosure, @Nullable Closure nameVanishedClosure)
      Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.
      Parameters:
      connection - A GDBusConnection.
      name - The name (well-known or unique) to watch.
      flags - Flags from the GBusNameWatcherFlags enumeration.
      nameAppearedClosure - GClosure to invoke when name is known to exist or null.
      nameVanishedClosure - GClosure to invoke when name is known to not exist or null.
      Returns:
      An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
      Since:
      2.26
    • busWatchName

      public static int busWatchName(BusType busType, String name, Set<BusNameWatcherFlags> flags, @Nullable Closure nameAppearedClosure, @Nullable Closure nameVanishedClosure)
      Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages.
      Parameters:
      busType - The type of bus to watch a name on.
      name - The name (well-known or unique) to watch.
      flags - Flags from the GBusNameWatcherFlags enumeration.
      nameAppearedClosure - GClosure to invoke when name is known to exist or null.
      nameVanishedClosure - GClosure to invoke when name is known to not exist or null.
      Returns:
      An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
      Since:
      2.26
    • busWatchName

      public static int busWatchName(BusType busType, String name, BusNameWatcherFlags flags, @Nullable Closure nameAppearedClosure, @Nullable Closure nameVanishedClosure)
      Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages.
      Parameters:
      busType - The type of bus to watch a name on.
      name - The name (well-known or unique) to watch.
      flags - Flags from the GBusNameWatcherFlags enumeration.
      nameAppearedClosure - GClosure to invoke when name is known to exist or null.
      nameVanishedClosure - GClosure to invoke when name is known to not exist or null.
      Returns:
      An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
      Since:
      2.26
    • contentTypeCanBeExecutable

      public static boolean contentTypeCanBeExecutable(String type)
      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).
      Parameters:
      type - a content type string
      Returns:
      true if the file type corresponds to a type that can be executable, false otherwise.
    • contentTypeEquals

      public static boolean contentTypeEquals(String type1, String type2)
      Compares two content types for equality.
      Parameters:
      type1 - a content type string
      type2 - a content type string
      Returns:
      true if the two strings are identical or equivalent, false otherwise.
    • contentTypeFromMimeType

      public static @Nullable String contentTypeFromMimeType(String mimeType)
      Tries to find a content type based on the mime type name.
      Parameters:
      mimeType - a mime type string
      Returns:
      Newly allocated string with content type or null. Free with g_free()
      Since:
      2.18
    • contentTypeGetDescription

      public static String contentTypeGetDescription(String type)
      Gets the human readable description of the content type.
      Parameters:
      type - a content type string
      Returns:
      a short description of the content type type. Free the returned string with g_free()
    • contentTypeGetGenericIconName

      public static @Nullable String contentTypeGetGenericIconName(String type)

      Gets the generic icon name for a content type.

      See the shared-mime-info specification for more on the generic icon name.

      Parameters:
      type - a content type string
      Returns:
      the registered generic icon name for the given type, or null if unknown. Free with g_free()
      Since:
      2.34
    • contentTypeGetIcon

      public static Icon contentTypeGetIcon(String type)
      Gets the icon for a content type.
      Parameters:
      type - a content type string
      Returns:
      GIcon corresponding to the content type. Free the returned object with g_object_unref()
    • contentTypeGetMimeDirs

      public static String[] contentTypeGetMimeDirs()
      Get the list of directories which MIME data is loaded from. See g_content_type_set_mime_dirs() for details.
      Returns:
      null-terminated list of directories to load MIME data from, including any mime/ subdirectory, and with the first directory to try listed first
      Since:
      2.60
    • contentTypeGetMimeType

      public static @Nullable String contentTypeGetMimeType(String type)
      Gets the mime type for the content type, if one is registered.
      Parameters:
      type - a content type string
      Returns:
      the registered mime type for the given type, or null if unknown; free with g_free().
    • contentTypeGetSymbolicIcon

      public static Icon contentTypeGetSymbolicIcon(String type)
      Gets the symbolic icon for a content type.
      Parameters:
      type - a content type string
      Returns:
      symbolic GIcon corresponding to the content type. Free the returned object with g_object_unref()
      Since:
      2.34
    • contentTypeGuess

      public static String contentTypeGuess(@Nullable String filename, @Nullable byte @Nullable [] data, @Nullable Out<Boolean> resultUncertain)
      Guesses the content type based on example data. If the function is uncertain, resultUncertain will be set to true. Either filename or data may be null, in which case the guess will be based solely on the other argument.
      Parameters:
      filename - a path, or null
      data - a stream of data, or null
      resultUncertain - return location for the certainty of the result, or null
      Returns:
      a string indicating a guessed content type for the given data. Free with g_free()
    • contentTypeGuessForTree

      public static String[] contentTypeGuessForTree(File root)

      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().

      Parameters:
      root - the root of the tree to guess a type for
      Returns:
      an null-terminated array of zero or more content types. Free with g_strfreev()
      Since:
      2.18
    • contentTypeIsA

      public static boolean contentTypeIsA(String type, String supertype)
      Determines if type is a subset of supertype.
      Parameters:
      type - a content type string
      supertype - a content type string
      Returns:
      true if type is a kind of supertype, false otherwise.
    • contentTypeIsMimeType

      public static boolean contentTypeIsMimeType(String type, String mimeType)
      Determines if type is a subset of mimeType. Convenience wrapper around g_content_type_is_a().
      Parameters:
      type - a content type string
      mimeType - a mime type string
      Returns:
      true if type is a kind of mimeType, false otherwise.
      Since:
      2.52
    • contentTypeIsUnknown

      public static boolean contentTypeIsUnknown(String type)
      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.
      Parameters:
      type - a content type string
      Returns:
      true if the type is the unknown type.
    • contentTypeSetMimeDirs

      public static void contentTypeSetMimeDirs(@Nullable String @Nullable [] dirs)

      Set the list of directories used by GIO to load the MIME database. If dirs is null, the directories used are the default:

      • the mime subdirectory of the directory in $XDG_DATA_HOME
      • the mime subdirectory 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 null 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 ();
      
      Parameters:
      dirs - null-terminated list of directories to load MIME data from, including any mime/ subdirectory, and with the first directory to try listed first
      Since:
      2.60
    • contentTypesGetRegistered

      public static List<String> contentTypesGetRegistered()
      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).
      Returns:
      list of the registered content types
    • dbusAddressEscapeValue

      public static String dbusAddressEscapeValue(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.

      Parameters:
      string - an unescaped string to be included in a D-Bus address as the value in a key-value pair
      Returns:
      a copy of string with all non-optionally-escaped bytes escaped
      Since:
      2.36
    • dbusAddressGetForBusSync

      public static String dbusAddressGetForBusSync(BusType busType, @Nullable Cancellable cancellable) throws GErrorException

      Synchronously looks up the D-Bus address for the well-known message bus instance specified by busType. This may involve using various platform specific mechanisms.

      The returned address will be in the D-Bus address format.

      Parameters:
      busType - a GBusType
      cancellable - a GCancellable or null
      Returns:
      a valid D-Bus address string for busType or null if error is set
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • dbusAddressGetStream

      public static void dbusAddressGetStream(String address, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback)

      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.

      Parameters:
      address - A valid D-Bus address.
      cancellable - A GCancellable or null.
      callback - A GAsyncReadyCallback to call when the request is satisfied.
      Since:
      2.26
    • dbusAddressGetStreamFinish

      public static IOStream dbusAddressGetStreamFinish(AsyncResult res, @Nullable Out<String> outGuid) throws GErrorException

      Finishes an operation started with g_dbus_address_get_stream().

      A server is not required to set a GUID, so outGuid may be set to null even on success.

      Parameters:
      res - A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().
      outGuid - null or return location to store the GUID extracted from address, if any.
      Returns:
      A GIOStream or null if error is set.
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • dbusAddressGetStreamSync

      public static IOStream dbusAddressGetStreamSync(String address, @Nullable Out<String> outGuid, @Nullable Cancellable cancellable) throws GErrorException

      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 outGuid may be set to null even on success.

      This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version.

      Parameters:
      address - A valid D-Bus address.
      outGuid - null or return location to store the GUID extracted from address, if any.
      cancellable - A GCancellable or null.
      Returns:
      A GIOStream or null if error is set.
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • dbusEscapeObjectPath

      public static String dbusEscapeObjectPath(String s)
      This is a language binding friendly version of g_dbus_escape_object_path_bytestring().
      Parameters:
      s - the string to escape
      Returns:
      an escaped version of s. Free with g_free().
      Since:
      2.68
    • dbusEscapeObjectPathBytestring

      public static String dbusEscapeObjectPathBytestring(@Nullable byte @Nullable [] bytes)

      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().

      Parameters:
      bytes - the string of bytes to escape
      Returns:
      an escaped version of bytes. Free with g_free().
      Since:
      2.68
    • dbusGenerateGuid

      public static String dbusGenerateGuid()

      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.

      Returns:
      A valid D-Bus GUID. Free with g_free().
      Since:
      2.26
    • dbusGvalueToGvariant

      public static Variant dbusGvalueToGvariant(Value gvalue, VariantType type)

      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 GVariantType

      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 null, the empty GVariant instance (never null) 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.

      Parameters:
      gvalue - A GValue to convert to a GVariant
      type - A GVariantType
      Returns:
      A GVariant (never floating) of GVariantType type holding the data from gvalue or an empty GVariant in case of failure. Free with g_variant_unref().
      Since:
      2.30
    • dbusGvariantToGvalue

      public static void dbusGvariantToGvalue(Variant value, Value outGvalue)

      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 outGvalue.

      Parameters:
      value - A GVariant.
      outGvalue - Return location pointing to a zero-filled (uninitialized) GValue.
      Since:
      2.30
    • dbusIsAddress

      public static boolean dbusIsAddress(String string)

      Checks if string is a D-Bus address.

      This doesn't check if string is actually supported by GDBusServer or GDBusConnection - use g_dbus_is_supported_address() to do more checks.

      Parameters:
      string - A string.
      Returns:
      true if string is a valid D-Bus address, false otherwise.
      Since:
      2.26
    • dbusIsErrorName

      public static boolean dbusIsErrorName(String string)

      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.

      Parameters:
      string - The string to check.
      Returns:
      true if valid, false otherwise.
      Since:
      2.70
    • dbusIsGuid

      public static boolean dbusIsGuid(String string)

      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.

      Parameters:
      string - The string to check.
      Returns:
      true if string is a GUID, false otherwise.
      Since:
      2.26
    • dbusIsInterfaceName

      public static boolean dbusIsInterfaceName(String string)
      Checks if string is a valid D-Bus interface name.
      Parameters:
      string - The string to check.
      Returns:
      true if valid, false otherwise.
      Since:
      2.26
    • dbusIsMemberName

      public static boolean dbusIsMemberName(String string)
      Checks if string is a valid D-Bus member (e.g. signal or method) name.
      Parameters:
      string - The string to check.
      Returns:
      true if valid, false otherwise.
      Since:
      2.26
    • dbusIsName

      public static boolean dbusIsName(String string)
      Checks if string is a valid D-Bus bus name (either unique or well-known).
      Parameters:
      string - The string to check.
      Returns:
      true if valid, false otherwise.
      Since:
      2.26
    • dbusIsSupportedAddress

      public static boolean dbusIsSupportedAddress(String string) throws GErrorException
      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.
      Parameters:
      string - A string.
      Returns:
      true if string is a valid D-Bus address that is supported by this library, false if error is set.
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • dbusIsUniqueName

      public static boolean dbusIsUniqueName(String string)
      Checks if string is a valid D-Bus unique bus name.
      Parameters:
      string - The string to check.
      Returns:
      true if valid, false otherwise.
      Since:
      2.26
    • dbusUnescapeObjectPath

      public static @Nullable byte @Nullable [] dbusUnescapeObjectPath(String s)

      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 null.

      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).

      Parameters:
      s - the string to unescape
      Returns:
      an unescaped version of s, or null if s is not a string returned from g_dbus_escape_object_path(). Free with g_free().
      Since:
      2.68
    • ioErrorFromErrno

      public static IOErrorEnum ioErrorFromErrno(int errNo)

      Converts errno.h error codes into GIO error codes.

      The fallback value IOErrorEnum.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);
      
      Parameters:
      errNo - Error number as defined in errno.h.
      Returns:
      GIOErrorEnum value for the given errno.h error number
    • ioErrorFromFileError

      public static IOErrorEnum ioErrorFromFileError(FileError fileError)
      Converts GFileError error codes into GIO error codes.
      Parameters:
      fileError - a GFileError.
      Returns:
      GIOErrorEnum value for the given GFileError error value.
      Since:
      2.74
    • ioErrorQuark

      public static Quark ioErrorQuark()
      Gets the GIO Error Quark.
      Returns:
      a GQuark.
    • ioModulesLoadAllInDirectory

      public static List<IOModule> ioModulesLoadAllInDirectory(String dirname)

      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.

      Parameters:
      dirname - pathname for a directory containing modules to load.
      Returns:
      a list of GIOModules loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free().
    • ioModulesLoadAllInDirectoryWithScope

      public static List<IOModule> ioModulesLoadAllInDirectoryWithScope(String dirname, IOModuleScope scope)

      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.

      Parameters:
      dirname - pathname for a directory containing modules to load.
      scope - a scope to use when scanning the modules.
      Returns:
      a list of GIOModules loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free().
      Since:
      2.30
    • ioModulesScanAllInDirectory

      public static void ioModulesScanAllInDirectory(String dirname)

      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().

      Parameters:
      dirname - pathname for a directory containing modules to scan.
      Since:
      2.24
    • ioModulesScanAllInDirectoryWithScope

      public static void ioModulesScanAllInDirectoryWithScope(String dirname, IOModuleScope scope)

      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().

      Parameters:
      dirname - pathname for a directory containing modules to scan.
      scope - a scope to use when scanning the modules
      Since:
      2.30
    • ioSchedulerCancelAllJobs

      @Deprecated public static void ioSchedulerCancelAllJobs()
      Deprecated.
      You should never call this function, since you don't know how other libraries in your program might be making use of gioscheduler.

      Cancels all cancellable I/O jobs.

      A job is cancellable if a GCancellable was passed into g_io_scheduler_push_job().

    • ioSchedulerPushJob

      @Deprecated public static void ioSchedulerPushJob(@Nullable IOSchedulerJobFunc jobFunc, int ioPriority, @Nullable Cancellable cancellable)
      Deprecated.
      use GThreadPool or g_task_run_in_thread()

      Schedules the I/O job to run in another thread.

      notify will be called on userData after jobFunc has returned, regardless whether the job was cancelled or has run to completion.

      If cancellable is not null, it can be used to cancel the I/O job by calling g_cancellable_cancel() or by calling g_io_scheduler_cancel_all_jobs().

      Parameters:
      jobFunc - a GIOSchedulerJobFunc.
      ioPriority - the I/O priority of the request.
      cancellable - optional GCancellable object, null to ignore.
    • keyfileSettingsBackendNew

      public static SettingsBackend keyfileSettingsBackendNew(String filename, String rootPath, @Nullable String rootGroup)

      Creates a keyfile-backed SettingsBackend.

      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 rootPath (which must start and end with a slash and not contain two consecutive slashes). rootPath may be "/".

      If rootGroup is non-NULL then it specifies the name of the keyfile group used for keys that are written directly below rootPath. For example, if rootPath is "/apps/example/" and rootGroup is "toplevel", then setting the key "/apps/example/enabled" to true will cause the following to appear in the keyfile:

      [toplevel]
      enabled=true
      

      If rootGroup is NULL then it is not permitted to store keys directly below the rootPath.

      For keys not stored directly below rootPath (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 rootPath and, in the event that rootGroup is NULL, also for keys directly under rootPath. 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 GKeyfileSettingsBackend:defaults-dir property, and a list of locked keys from a text file with the name locks in the same location.

      Parameters:
      filename - the filename of the keyfile
      rootPath - the path under which all settings keys appear
      rootGroup - the group name corresponding to rootPath, or NULL to disallow storing keys directly beneath rootPath
      Returns:
      a keyfile-backed SettingsBackend
    • memorySettingsBackendNew

      public static SettingsBackend memorySettingsBackendNew()

      Creates a memory-backed GSettingsBackend.

      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.

      Returns:
      a newly created GSettingsBackend
      Since:
      2.28
    • networkingInit

      public static void networkingInit()
      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).
      Since:
      2.36
    • nullSettingsBackendNew

      public static SettingsBackend nullSettingsBackendNew()

      Creates a readonly GSettingsBackend.

      This backend does not allow changes to settings, so all settings will always have their default values.

      Returns:
      a newly created GSettingsBackend
      Since:
      2.28
    • pollableSourceNew

      public static Source pollableSourceNew(GObject pollableStream)
      Utility method for GPollableInputStream and GPollableOutputStream implementations. Creates a new GSource that expects a callback of type GPollableSourceFunc. 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.
      Parameters:
      pollableStream - the stream associated with the new source
      Returns:
      the new GSource.
      Since:
      2.28
    • pollableSourceNewFull

      public static Source pollableSourceNewFull(GObject pollableStream, @Nullable Source childSource, @Nullable Cancellable cancellable)
      Utility method for GPollableInputStream and GPollableOutputStream implementations. Creates a new GSource, as with g_pollable_source_new(), but also attaching childSource (with a dummy callback), and cancellable, if they are non-null.
      Parameters:
      pollableStream - the stream associated with the new source
      childSource - optional child source to attach
      cancellable - optional GCancellable to attach
      Returns:
      the new GSource.
      Since:
      2.34
    • pollableStreamRead

      public static long pollableStreamRead(InputStream stream, @Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) throws GErrorException

      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 GPollableInputStream 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 GPollableInputStream.

      Parameters:
      stream - a GInputStream
      buffer - a buffer to read data into
      blocking - whether to do blocking I/O
      cancellable - optional GCancellable object, null to ignore.
      Returns:
      the number of bytes read, or -1 on error.
      Throws:
      GErrorException - see GError
      Since:
      2.34
    • pollableStreamWrite

      public static long pollableStreamWrite(OutputStream stream, @Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) throws GErrorException

      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 GPollableOutputStream 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 GPollableOutputStream.

      Parameters:
      stream - a GOutputStream.
      buffer - the buffer containing the data to write.
      blocking - whether to do blocking I/O
      cancellable - optional GCancellable object, null to ignore.
      Returns:
      the number of bytes written, or -1 on error.
      Throws:
      GErrorException - see GError
      Since:
      2.34
    • pollableStreamWriteAll

      public static boolean pollableStreamWriteAll(OutputStream stream, @Nullable byte @Nullable [] buffer, boolean blocking, Out<Long> bytesWritten, @Nullable Cancellable cancellable) throws GErrorException

      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 bytesWritten is set to count.

      If there is an error during the operation (including IOErrorEnum.WOULD_BLOCK in the non-blocking case), false is returned and error is set to indicate the error status, bytesWritten 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 GPollableOutputStream 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 GPollableOutputStream.

      Parameters:
      stream - a GOutputStream.
      buffer - the buffer containing the data to write.
      blocking - whether to do blocking I/O
      bytesWritten - location to store the number of bytes that was written to the stream
      cancellable - optional GCancellable object, null to ignore.
      Returns:
      true on success, false if there was an error
      Throws:
      GErrorException - see GError
      Since:
      2.34
    • resourcesEnumerateChildren

      public static String[] resourcesEnumerateChildren(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException

      Returns all the names of children at the specified path in the set of globally registered resources.

      The return result is a NULL terminated list of strings which should be released with GLib#strfreev.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      an array of constant strings
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesEnumerateChildren

      public static String[] resourcesEnumerateChildren(String path, ResourceLookupFlags... lookupFlags) throws GErrorException

      Returns all the names of children at the specified path in the set of globally registered resources.

      The return result is a NULL terminated list of strings which should be released with GLib#strfreev.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      an array of constant strings
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesGetInfo

      public static boolean resourcesGetInfo(String path, Set<ResourceLookupFlags> lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      size - a location to place the length of the contents of the file, or NULL if the length is not needed
      flags - a location to place the Gio.ResourceFlags about the file, or NULL if the flags are not needed
      Returns:
      TRUE if the file was found, FALSE if there were errors
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesGetInfo

      public static boolean resourcesGetInfo(String path, ResourceLookupFlags lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and if found returns information about it.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      size - a location to place the length of the contents of the file, or NULL if the length is not needed
      flags - a location to place the Gio.ResourceFlags about the file, or NULL if the flags are not needed
      Returns:
      TRUE if the file was found, FALSE if there were errors
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesHasChildren

      public static boolean resourcesHasChildren(String path)
      Returns whether the specified path in the set of globally registered resources has children.
      Parameters:
      path - A pathname
      Returns:
      true if patch has children
      Since:
      2.84
    • resourcesLookupData

      public static byte[] resourcesLookupData(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and returns a GLib.Bytes 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 GLib.Bytes.

      For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some read-only data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      GLib.Bytes or NULL on error
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesLookupData

      public static byte[] resourcesLookupData(String path, ResourceLookupFlags... lookupFlags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and returns a GLib.Bytes 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 GLib.Bytes.

      For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some read-only data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      GLib.Bytes or NULL on error
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesOpenStream

      public static InputStream resourcesOpenStream(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and returns a InputStream that lets you read the data.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      InputStream or NULL on error
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesOpenStream

      public static InputStream resourcesOpenStream(String path, ResourceLookupFlags... lookupFlags) throws GErrorException

      Looks for a file at the specified path in the set of globally registered resources and returns a InputStream that lets you read the data.

      lookupFlags controls the behaviour of the lookup.

      Parameters:
      path - A path name inside the resource
      lookupFlags - A Gio.ResourceLookupFlags
      Returns:
      InputStream or NULL on error
      Throws:
      GErrorException - see GError
      Since:
      2.32
    • resourcesRegister

      public static void resourcesRegister(Resource resource)

      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 resourcesLookupData(String, Set).

      Parameters:
      resource - A Gio.Resource
      Since:
      2.32
    • resourcesUnregister

      public static void resourcesUnregister(Resource resource)
      Unregisters the resource from the process-global set of resources.
      Parameters:
      resource - A Gio.Resource
      Since:
      2.32
    • simpleAsyncReportErrorInIdle

      @Deprecated public static void simpleAsyncReportErrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, Quark domain, int code, String format, Object... varargs)
      Deprecated.
      Use g_task_report_error().
      Reports an error in an asynchronous function in an idle function by directly setting the contents of the GAsyncResult with the given error information.
      Parameters:
      object - a GObject, or null.
      callback - a GAsyncReadyCallback.
      domain - a GQuark containing the error domain (usually G_IO_ERROR).
      code - a specific error code.
      format - a formatted error reporting string.
      varargs - a list of variables to fill in format.
    • simpleAsyncReportGerrorInIdle

      @Deprecated public static void simpleAsyncReportGerrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error)
      Deprecated.
      Use g_task_report_error().
      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.
      Parameters:
      object - a GObject, or null
      callback - a GAsyncReadyCallback.
      error - the GError to report
    • simpleAsyncReportTakeGerrorInIdle

      @Deprecated public static void simpleAsyncReportTakeGerrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error)
      Deprecated.
      Use g_task_report_error().
      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.
      Parameters:
      object - a GObject, or null
      callback - a GAsyncReadyCallback.
      error - the GError to report
      Since:
      2.28
    • ioErrorFromWin32Error

      public static IOErrorEnum ioErrorFromWin32Error(int errorCode)

      Converts some common error codes (as returned from GetLastError() or WSAGetLastError()) into GIO error codes. The fallback value IOErrorEnum.FAILED is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).

      You can use g_win32_error_message() to get a localized string corresponding to errorCode. (But note that unlike g_strerror(), g_win32_error_message() returns a string that must be freed.)

      Parameters:
      errorCode - Windows error number.
      Returns:
      GIOErrorEnum value for the given error number.
      Since:
      2.26