Class Gio
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe value returned by handlers of the signals generated by thegdbus-codegentool to indicate that a method call has been handled by an implementation.static final booleanThe value returned by handlers of the signals generated by thegdbus-codegentool to indicate that a method call has not been handled by an implementation.static final StringExtension point for debug control functionality.static final StringThe string used to obtain a Unix device path with g_drive_get_identifier().static final StringA key in the "access" namespace for checking deletion privileges.static final StringA key in the "access" namespace for getting execution privileges.static final StringA key in the "access" namespace for getting read privileges.static final StringA key in the "access" namespace for checking renaming privileges.static final StringA key in the "access" namespace for checking trashing privileges.static final StringA key in the "access" namespace for getting write privileges.static final StringA key in the "dos" namespace for checking if the file's archive flag is set.static final StringA key in the "dos" namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).static final StringA key in the "dos" namespace for checking if the file's backup flag is set.static final StringA key in the "dos" namespace for getting the file NTFS reparse tag.static final StringA key in the "etag" namespace for getting the value of the file's entity tag.static final StringA key in the "filesystem" namespace for getting the number of bytes of free space left on the file system.static final StringA key in the "filesystem" namespace for checking if the file system is read only.static final StringA key in the "filesystem" namespace for checking if the file system is remote.static final StringA key in the "filesystem" namespace for getting the total size (in bytes) of the file system, used in g_file_query_filesystem_info().static final StringA key in the "filesystem" namespace for getting the file system's type.static final StringA key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g.static final StringA key in the "filesystem" namespace for getting the number of bytes used by data on the file system.static final StringA key in the "gvfs" namespace that gets the name of the current GVFS backend in use.static final StringA key in the "id" namespace for getting a file identifier.static final StringA key in the "id" namespace for getting the file system identifier.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.static final StringA key in the "mountable" namespace for getting the HAL UDI for the mountable file.static final StringA key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.static final StringA key in the "mountable" namespace for getting theGDriveStartStopType.static final StringA key in the "mountable" namespace for getting the unix device.static final StringA key in the "mountable" namespace for getting the unix device file.static final StringA key in the "owner" namespace for getting the file owner's group.static final StringA key in the "owner" namespace for getting the user name of the file's owner.static final StringA key in the "owner" namespace for getting the real name of the user that owns the file.static final StringA key in the "preview" namespace for getting aGIconthat can be used to get preview of the file.static final StringA key in the "recent" namespace for getting time, when the metadata for the file inrecent:///was last changed.static final StringA key in the "selinux" namespace for getting the file's SELinux context.static final StringA key in the "standard" namespace for getting the amount of disk space that is consumed by the file (in bytes).static final StringA key in the "standard" namespace for getting the content type of the file.static final StringA key in the "standard" namespace for getting the copy name of the file.static final StringA key in the "standard" namespace for getting the description of the file.static final StringA key in the "standard" namespace for getting the display name of the file.static final StringA key in the "standard" namespace for edit name of the file.static final StringA key in the "standard" namespace for getting the fast content type.static final StringA key in the "standard" namespace for getting the icon for the file.static final StringA key in the "standard" namespace for checking if a file is a backup file.static final StringA key in the "standard" namespace for checking if a file is hidden.static final StringA key in the "standard" namespace for checking if the file is a symlink.static final StringA key in the "standard" namespace for checking if a file is virtual.static final StringA key in the "standard" namespace for checking if a file is volatile.static final StringA key in the "standard" namespace for getting the name of the file.static final StringA key in the "standard" namespace for getting the file's size (in bytes).static final StringA key in the "standard" namespace for setting the sort order of a file.static final StringA key in the "standard" namespace for getting the symbolic icon for the file.static final StringA key in the "standard" namespace for getting the symlink target, if the file is a symlink.static final StringA key in the "standard" namespace for getting the target URI for the file, in the case ofFileType.SHORTCUTorFileType.MOUNTABLEfiles.static final StringA key in the "standard" namespace for storing file types.static final StringA key in the "thumbnail" namespace for checking whether the thumbnail is outdated.static final StringA key in the "thumbnail" namespace for checking whether the large thumbnail is outdated.static final StringA key in the "thumbnail" namespace for checking whether the normal thumbnail is outdated.static final StringA key in the "thumbnail" namespace for checking whether the x-large thumbnail is outdated.static final StringA key in the "thumbnail" namespace for checking whether the xx-large thumbnail is outdated.static final StringA key in the "thumbnail" namespace for getting the path to the thumbnail image with the biggest size available.static final StringA key in the "thumbnail" namespace for getting the path to the large thumbnail image.static final StringA key in the "thumbnail" namespace for getting the path to the normal thumbnail image.static final StringA key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.static final StringA key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.static final StringA key in the "thumbnail" namespace for checking if thumbnailing failed.static final StringA key in the "thumbnail" namespace for checking if thumbnailing failed for the large image.static final StringA key in the "thumbnail" namespace for checking if thumbnailing failed for the normal image.static final StringA key in the "thumbnail" namespace for checking if thumbnailing failed for the x-large image.static final StringA key in the "thumbnail" namespace for checking if thumbnailing failed for the xx-large image.static final StringA key in the "time" namespace for getting the time the file was last accessed.static final StringA key in the "time" namespace for getting the nanoseconds of the time the file was last accessed.static final StringA key in the "time" namespace for getting the microseconds of the time the file was last accessed.static final StringA key in the "time" namespace for getting the time the file was last changed.static final StringA key in the "time" namespace for getting the nanoseconds of the time the file was last changed.static final StringA key in the "time" namespace for getting the microseconds of the time the file was last changed.static final StringA key in the "time" namespace for getting the time the file was created.static final StringA key in the "time" namespace for getting the nanoseconds of the time the file was created.static final StringA key in the "time" namespace for getting the microseconds of the time the file was created.static final StringA key in the "time" namespace for getting the time the file was last modified.static final StringA key in the "time" namespace for getting the nanoseconds of the time the file was last modified.static final StringA key in the "time" namespace for getting the microseconds of the time the file was last modified.static final StringA key in the "trash" namespace for getting the deletion date and time of a file inside thetrash:///folder.static final StringA key in the "trash" namespace for getting the number of (toplevel) items that are present in thetrash:///folder.static final StringA key in the "trash" namespace for getting the original path of a file inside thetrash:///folder before it was trashed.static final StringA key in the "unix" namespace for getting the block size for the file system.static final StringA key in the "unix" namespace for getting the number of blocks allocated for the file.static final StringA key in the "unix" namespace for getting the device id of the device the file is located on (see stat() documentation).static final StringA key in the "unix" namespace for getting the group ID for the file.static final StringA key in the "unix" namespace for getting the inode of the file.static final StringA key in the "unix" namespace for checking if the file represents a UNIX mount point.static final StringA key in the "unix" namespace for getting the mode of the file (e.g.static final StringA key in the "unix" namespace for getting the number of hard links for a file.static final StringA key in the "unix" namespace for getting the device ID for the file (if it is a special file).static final StringA key in the "unix" namespace for getting the user ID for the file.static final StringExtension point for memory usage monitoring functionality.static final StringThe menu item attribute which holds the action name of the item.static final StringThe menu item attribute that holds the namespace for all action names in menus that are linked from this item.static final StringThe menu item attribute which holds the icon of the item.static final StringThe menu item attribute which holds the label of the item.static final StringThe menu item attribute which holds the target with which the item's action will be activated.static final intThe maximum number of entries in a menu section supported by g_dbus_connection_export_menu_model().static final StringThe name of the link that associates a menu item with a section.static final StringThe name of the link that associates a menu item with a submenu.static final Stringstatic final StringExtension point for network status monitoring functionality.static final StringExtension point for power profile usage monitoring functionality.static final StringExtension point for proxy functionality.static final StringExtension point for proxy resolving functionality.static final StringExtension point forGSettingsBackendfunctionality.static final StringExtension point for TLS functionality viaGTlsBackend.static final StringThe purpose used to verify the client certificate in a TLS connection.static final StringThe purpose used to verify the server certificate in a TLS connection.static final StringExtension point forGVfsfunctionality.static final StringThe string used to obtain the volume class with g_volume_get_identifier().static final StringDeprecated.Do not use, HAL is deprecated.static final StringThe string used to obtain a filesystem label with g_volume_get_identifier().static final StringThe string used to obtain a NFS mount with g_volume_get_identifier().static final StringThe string used to obtain a Unix device path with g_volume_get_identifier().static final StringThe string used to obtain a UUID with g_volume_get_identifier().static final StringExtension point for volume monitor functionality. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbusGet(BusType busType, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously connects to the message bus specified bybusType.static DBusConnectionbusGetFinish(AsyncResult res) Finishes an operation started with g_bus_get().static DBusConnectionbusGetSync(BusType busType, @Nullable Cancellable cancellable) Synchronously connects to the message bus specified bybusType.Note that the returned object may shared with other callers, e.g.static intbusOwnName(BusType busType, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of [funcGio.busOwnNameusing closures instead of callbacks for easier binding in other languages.static intbusOwnName(BusType busType, String name, BusNameOwnerFlags flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of [funcGio.busOwnNameusing closures instead of callbacks for easier binding in other languages.static intbusOwnNameOnConnection(DBusConnection connection, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version ofbusOwnNameOnConnection(org.gnome.gio.DBusConnection, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure)using closures instead of callbacks for easier binding in other languages.static intbusOwnNameOnConnection(DBusConnection connection, String name, BusNameOwnerFlags flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version ofbusOwnNameOnConnection(org.gnome.gio.DBusConnection, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure)using closures instead of callbacks for easier binding in other languages.static voidbusUnownName(int ownerId) Stops owning a name.static voidbusUnwatchName(int watcherId) Stops watching a name.static intbusWatchName(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.static intbusWatchName(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.static intbusWatchNameOnConnection(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.static intbusWatchNameOnConnection(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.static booleanChecks if a content type can be executable.static booleancontentTypeEquals(String type1, String type2) Compares two content types for equality.static @Nullable StringcontentTypeFromMimeType(String mimeType) Tries to find a content type based on the mime type name.static StringGets the human readable description of the content type.static @Nullable StringGets the generic icon name for a content type.static IconcontentTypeGetIcon(String type) Gets the icon for a content type.static String[]Get the list of directories which MIME data is loaded from.static @Nullable StringcontentTypeGetMimeType(String type) Gets the mime type for the content type, if one is registered.static IconGets the symbolic icon for a content type.static StringcontentTypeGuess(@Nullable String filename, @org.jspecify.annotations.Nullable byte @Nullable [] data, @Nullable Out<Boolean> resultUncertain) Guesses the content type based on example data.static String[]contentTypeGuessForTree(File root) Tries to guess the type of the tree with rootroot,by looking at the files it contains.static booleancontentTypeIsA(String type, String supertype) Determines iftypeis a subset ofsupertype.static booleancontentTypeIsMimeType(String type, String mimeType) Determines iftypeis a subset ofmimeType.Convenience wrapper around g_content_type_is_a().static booleancontentTypeIsUnknown(String type) Checks if the content type is the generic "unknown" type.static voidcontentTypeSetMimeDirs(@Nullable String @Nullable [] dirs) Set the list of directories used by GIO to load the MIME database.Gets a list of strings containing all the registered content types known to the system.static StringdbusAddressEscapeValue(String string) Escapestringso it can appear in a D-Bus address as the value part of a key-value pair.static StringdbusAddressGetForBusSync(BusType busType, @Nullable Cancellable cancellable) Synchronously looks up the D-Bus address for the well-known message bus instance specified bybusType.This may involve using various platform specific mechanisms.static voiddbusAddressGetStream(String address, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously connects to an endpoint specified byaddressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.static IOStreamdbusAddressGetStreamFinish(AsyncResult res, @Nullable Out<String> outGuid) Finishes an operation started with g_dbus_address_get_stream().static IOStreamdbusAddressGetStreamSync(String address, @Nullable Out<String> outGuid, @Nullable Cancellable cancellable) Synchronously connects to an endpoint specified byaddressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.static StringThis is a language binding friendly version of g_dbus_escape_object_path_bytestring().static StringdbusEscapeObjectPathBytestring(@org.jspecify.annotations.Nullable byte @Nullable [] bytes) Escapesbytesfor use in a D-Bus object path component.static StringGenerate a D-Bus GUID that can be used with e.g.static VariantdbusGvalueToGvariant(Value gvalue, VariantType type) Converts aGValueto aGVariantof the type indicated by thetypeparameter.static voiddbusGvariantToGvalue(Variant value, Value outGvalue) Converts aGVariantto aGValue.static booleandbusIsAddress(String string) Checks ifstringis a D-Bus address.static booleandbusIsErrorName(String string) Check whetherstringis a valid D-Bus error name.static booleandbusIsGuid(String string) Checks ifstringis a D-Bus GUID.static booleandbusIsInterfaceName(String string) Checks ifstringis a valid D-Bus interface name.static booleandbusIsMemberName(String string) Checks ifstringis a valid D-Bus member (e.g.static booleandbusIsName(String string) Checks ifstringis a valid D-Bus bus name (either unique or well-known).static booleandbusIsSupportedAddress(String string) Like g_dbus_is_address() but also checks if the library supports the transports instringand that key/value pairs for each transport are valid.static booleandbusIsUniqueName(String string) Checks ifstringis a valid D-Bus unique bus name.static @org.jspecify.annotations.Nullable byte @Nullable []Unescapes an string that was previously escaped with g_dbus_escape_object_path().static IOErrorEnumioErrorFromErrno(int errNo) Convertserrno.herror codes into GIO error codes.static IOErrorEnumioErrorFromFileError(FileError fileError) ConvertsGFileErrorerror codes into GIO error codes.static IOErrorEnumioErrorFromWin32Error(int errorCode) Converts some common error codes (as returned from GetLastError() or WSAGetLastError()) into GIO error codes.static QuarkGets the GIO Error Quark.ioModulesLoadAllInDirectory(String dirname) Loads all the modules in the specified directory.ioModulesLoadAllInDirectoryWithScope(String dirname, IOModuleScope scope) Loads all the modules in the specified directory.static voidioModulesScanAllInDirectory(String dirname) Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.static voidioModulesScanAllInDirectoryWithScope(String dirname, IOModuleScope scope) Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.static voidDeprecated.You should never call this function, since you don't know how other libraries in your program might be making use of gioscheduler.static voidioSchedulerPushJob(@Nullable IOSchedulerJobFunc jobFunc, int ioPriority, @Nullable Cancellable cancellable) Deprecated.useGThreadPoolor g_task_run_in_thread()static voidstatic SettingsBackendkeyfileSettingsBackendNew(String filename, String rootPath, @Nullable String rootGroup) Creates a keyfile-backedSettingsBackend.static SettingsBackendCreates a memory-backedGSettingsBackend.static voidInitializes the platform networking libraries (eg, on Windows, this calls WSAStartup()).static SettingsBackendCreates a readonlyGSettingsBackend.static SourcepollableSourceNew(GObject pollableStream) Utility method forGPollableInputStreamandGPollableOutputStreamimplementations.static SourcepollableSourceNewFull(GObject pollableStream, @Nullable Source childSource, @Nullable Cancellable cancellable) Utility method forGPollableInputStreamandGPollableOutputStreamimplementations.static longpollableStreamRead(InputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) Tries to read fromstream,as with g_input_stream_read() (ifblockingistrue) or g_pollable_input_stream_read_nonblocking() (ifblockingisfalse).static longpollableStreamWrite(OutputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) Tries to write tostream,as with g_output_stream_write() (ifblockingistrue) or g_pollable_output_stream_write_nonblocking() (ifblockingisfalse).static booleanpollableStreamWriteAll(OutputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, Out<Long> bytesWritten, @Nullable Cancellable cancellable) Tries to writecountbytes tostream,as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write().static String[]resourcesEnumerateChildren(String path, Set<ResourceLookupFlags> lookupFlags) Returns all the names of children at the specifiedpathin the set of globally registered resources.static String[]resourcesEnumerateChildren(String path, ResourceLookupFlags... lookupFlags) Returns all the names of children at the specifiedpathin the set of globally registered resources.static booleanresourcesGetInfo(String path, Set<ResourceLookupFlags> lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) Looks for a file at the specifiedpathin the set of globally registered resources and if found returns information about it.static booleanresourcesGetInfo(String path, ResourceLookupFlags lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) Looks for a file at the specifiedpathin the set of globally registered resources and if found returns information about it.static booleanresourcesHasChildren(String path) Returns whether the specifiedpathin the set of globally registered resources has children.static byte[]resourcesLookupData(String path, Set<ResourceLookupFlags> lookupFlags) Looks for a file at the specifiedpathin the set of globally registered resources and returns aGLib.Bytesthat lets you directly access the data in memory.static byte[]resourcesLookupData(String path, ResourceLookupFlags... lookupFlags) Looks for a file at the specifiedpathin the set of globally registered resources and returns aGLib.Bytesthat lets you directly access the data in memory.static InputStreamresourcesOpenStream(String path, Set<ResourceLookupFlags> lookupFlags) Looks for a file at the specifiedpathin the set of globally registered resources and returns aInputStreamthat lets you read the data.static InputStreamresourcesOpenStream(String path, ResourceLookupFlags... lookupFlags) Looks for a file at the specifiedpathin the set of globally registered resources and returns aInputStreamthat lets you read the data.static voidresourcesRegister(Resource resource) Registers the resource with the process-global set of resources.static voidresourcesUnregister(Resource resource) Unregisters the resource from the process-global set of resources.static voidsimpleAsyncReportErrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, Quark domain, int code, String format, Object... varargs) Deprecated.Use g_task_report_error().static voidsimpleAsyncReportGerrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error) Deprecated.Use g_task_report_error().static voidsimpleAsyncReportTakeGerrorInIdle(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error) Deprecated.Use g_task_report_error().
-
Field Details
-
DBUS_METHOD_INVOCATION_HANDLED
public static final boolean DBUS_METHOD_INVOCATION_HANDLEDThe value returned by handlers of the signals generated by thegdbus-codegentool to indicate that a method call has been handled by an implementation. It is equal totrue, but using this macro is sometimes more readable.In code that needs to be backwards-compatible with older GLib, use
trueinstead, 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_UNHANDLEDThe value returned by handlers of the signals generated by thegdbus-codegentool to indicate that a method call has not been handled by an implementation. It is equal tofalse, but using this macro is sometimes more readable.In code that needs to be backwards-compatible with older GLib, use
falseinstead.- Since:
- 2.68
- See Also:
-
DEBUG_CONTROLLER_EXTENSION_POINT_NAME
Extension point for debug control functionality. See Extending GIO.- Since:
- 2.72
- See Also:
-
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
A key in the "access" namespace for checking deletion privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to delete the file.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE
A key in the "access" namespace for getting execution privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to execute the file.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_READ
A key in the "access" namespace for getting read privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to read the file.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_RENAME
A key in the "access" namespace for checking renaming privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to rename the file.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_TRASH
A key in the "access" namespace for checking trashing privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to move the file to the trash.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_WRITE
A key in the "access" namespace for getting write privileges.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.This attribute will be
trueif the user is able to write to the file.- See Also:
-
FILE_ATTRIBUTE_DOS_IS_ARCHIVE
A key in the "dos" namespace for checking if the file's archive flag is set.This attribute is
trueif the archive flag is set.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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
trueif file is a reparse point of type IO_REPARSE_TAG_MOUNT_POINT.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.60
- See Also:
-
FILE_ATTRIBUTE_DOS_IS_SYSTEM
A key in the "dos" namespace for checking if the file's backup flag is set.This attribute is
trueif the backup flag is set.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.60
- See Also:
-
FILE_ATTRIBUTE_ETAG_VALUE
A key in the "etag" namespace for getting the value of the file's entity tag.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT64.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_READONLY
A key in the "filesystem" namespace for checking if the file system is read only.Is set to
trueif the file system is read only.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_REMOTE
A key in the "filesystem" namespace for checking if the file system is remote.Is set to
trueif the file system is remote.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT64.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_TYPE
A key in the "filesystem" namespace for getting the file system's type.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_USED
A key in the "filesystem" namespace for getting the number of bytes used by data on the file system.Corresponding
GFileAttributeTypeisFileAttributeType.UINT64.- Since:
- 2.32
- See Also:
-
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
A key in the "gvfs" namespace that gets the name of the current GVFS backend in use.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_ID_FILE
A key in the "id" namespace for getting a file identifier.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.An example use would be during listing files, to avoid recursive directory scanning.
- See Also:
-
FILE_ATTRIBUTE_ID_FILESYSTEM
A key in the "id" namespace for getting the file system identifier.Corresponding
GFileAttributeTypeisFileAttributeType.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
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.22
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.22
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.22
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.22
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI
A key in the "mountable" namespace for getting the HAL UDI for the mountable file.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.22
- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE
A key in the "mountable" namespace for getting theGDriveStartStopType.Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.22
- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE
A key in the "mountable" namespace for getting the unix device.Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
A key in the "mountable" namespace for getting the unix device file.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- Since:
- 2.22
- See Also:
-
FILE_ATTRIBUTE_OWNER_GROUP
A key in the "owner" namespace for getting the file owner's group.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_OWNER_USER
A key in the "owner" namespace for getting the user name of the file's owner.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_OWNER_USER_REAL
A key in the "owner" namespace for getting the real name of the user that owns the file.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_PREVIEW_ICON
A key in the "preview" namespace for getting aGIconthat can be used to get preview of the file.For example, it may be a low resolution thumbnail without metadata.
Corresponding
GFileAttributeTypeisFileAttributeType.OBJECT.The value for this key should contain a
GIcon.- Since:
- 2.20
- See Also:
-
FILE_ATTRIBUTE_RECENT_MODIFIED
A key in the "recent" namespace for getting time, when the metadata for the file inrecent:///was last changed.Corresponding
GFileAttributeTypeisFileAttributeType.INT64.- Since:
- 2.52
- See Also:
-
FILE_ATTRIBUTE_SELINUX_CONTEXT
A key in the "selinux" namespace for getting the file's SELinux context.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.Note that this attribute is only available if GLib has been built with SELinux support.
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT64.- Since:
- 2.20
- See Also:
-
FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
A key in the "standard" namespace for getting the content type of the file.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.The value for this key should contain a valid content type.
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_STANDARD_ICON
A key in the "standard" namespace for getting the icon for the file.Corresponding
GFileAttributeTypeisFileAttributeType.OBJECT.The value for this key should contain a
GIcon.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_BACKUP
A key in the "standard" namespace for checking if a file is a backup file.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_HIDDEN
A key in the "standard" namespace for checking if a file is hidden.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_SYMLINK
A key in the "standard" namespace for checking if the file is a symlink. Typically the actual type is something else, if we followed the symlink to get the type.On Windows NTFS mountpoints are considered to be symlinks as well.
Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL
A key in the "standard" namespace for checking if a file is virtual.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
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 atG_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGETfor the persistent URI.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.46
- See Also:
-
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_NAMEif you need to display the name in a user interface.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- See Also:
-
FILE_ATTRIBUTE_STANDARD_SIZE
A key in the "standard" namespace for getting the file's size (in bytes).Corresponding
GFileAttributeTypeisFileAttributeType.UINT64.- See Also:
-
FILE_ATTRIBUTE_STANDARD_SORT_ORDER
A key in the "standard" namespace for setting the sort order of a file.Corresponding
GFileAttributeTypeisFileAttributeType.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
A key in the "standard" namespace for getting the symbolic icon for the file.Corresponding
GFileAttributeTypeisFileAttributeType.OBJECT.The value for this key should contain a
GIcon.- Since:
- 2.34
- See Also:
-
FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET
A key in the "standard" namespace for getting the symlink target, if the file is a symlink.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- See Also:
-
FILE_ATTRIBUTE_STANDARD_TARGET_URI
A key in the "standard" namespace for getting the target URI for the file, in the case ofFileType.SHORTCUTorFileType.MOUNTABLEfiles.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- See Also:
-
FILE_ATTRIBUTE_STANDARD_TYPE
A key in the "standard" namespace for storing file types.Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.The value for this key should contain a
GFileType.- See Also:
-
FILE_ATTRIBUTE_THUMBNAILING_FAILED
A key in the "thumbnail" namespace for checking if thumbnailing failed.This attribute is
trueif thumbnailing failed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE
A key in the "thumbnail" namespace for checking if thumbnailing failed for the large image.This attribute is
trueif thumbnailing failed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL
A key in the "thumbnail" namespace for checking if thumbnailing failed for the normal image.This attribute is
trueif thumbnailing failed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE
A key in the "thumbnail" namespace for checking if thumbnailing failed for the x-large image.This attribute is
trueif thumbnailing failed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE
A key in the "thumbnail" namespace for checking if thumbnailing failed for the xx-large image.This attribute is
trueif thumbnailing failed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.This attribute is
trueif the thumbnail is up-to-date with the file it represents, andfalseif the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILEDistrueand this attribute isfalse, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.40
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_LARGE
A key in the "thumbnail" namespace for checking whether the large thumbnail is outdated.This attribute is
trueif the large thumbnail is up-to-date with the file it represents, andfalseif the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGEistrueand this attribute isfalse, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_NORMAL
A key in the "thumbnail" namespace for checking whether the normal thumbnail is outdated.This attribute is
trueif the normal thumbnail is up-to-date with the file it represents, andfalseif the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAListrueand this attribute isfalse, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XLARGE
A key in the "thumbnail" namespace for checking whether the x-large thumbnail is outdated.This attribute is
trueif the x-large thumbnail is up-to-date with the file it represents, andfalseif the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGEistrueand this attribute isfalse, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID_XXLARGE
A key in the "thumbnail" namespace for checking whether the xx-large thumbnail is outdated.This attribute is
trueif the x-large thumbnail is up-to-date with the file it represents, andfalseif the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGEistrueand this attribute isfalse, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeTypeisFileAttributeType.BOOLEAN.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH
A key in the "thumbnail" namespace for getting the path to the thumbnail image with the biggest size available.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_LARGE
A key in the "thumbnail" namespace for getting the path to the large thumbnail image.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL
A key in the "thumbnail" namespace for getting the path to the normal thumbnail image.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE
A key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE
A key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- Since:
- 2.76
- See Also:
-
FILE_ATTRIBUTE_TIME_ACCESS
A key in the "time" namespace for getting the time the file was last accessed.Corresponding
GFileAttributeTypeisFileAttributeType.UINT64, and contains the time since the file was last accessed, in seconds since the UNIX epoch.- See Also:
-
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 withG_FILE_ATTRIBUTE_TIME_ACCESS. CorrespondingGFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.74
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_TIME_CHANGED
A key in the "time" namespace for getting the time the file was last changed.Corresponding
GFileAttributeTypeisFileAttributeType.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
A key in the "time" namespace for getting the nanoseconds of the time the file was last changed. This should be used in conjunction withG_FILE_ATTRIBUTE_TIME_CHANGED. CorrespondingGFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.74
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_TIME_CREATED
A key in the "time" namespace for getting the time the file was created.Corresponding
GFileAttributeTypeisFileAttributeType.UINT64, and contains the time since the file was created, in seconds since the UNIX epoch.This may correspond to Linux
stx_btime, FreeBSDst_birthtim, NetBSDst_birthtimeor NTFSctime.- See Also:
-
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 withG_FILE_ATTRIBUTE_TIME_CREATED. CorrespondingGFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.74
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_TIME_MODIFIED
A key in the "time" namespace for getting the time the file was last modified.Corresponding
GFileAttributeTypeisFileAttributeType.UINT64, and contains the time since the file was modified, in seconds since the UNIX epoch.- See Also:
-
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 withG_FILE_ATTRIBUTE_TIME_MODIFIED. CorrespondingGFileAttributeTypeisFileAttributeType.UINT32.- Since:
- 2.74
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_TRASH_DELETION_DATE
A key in the "trash" namespace for getting the deletion date and time of a file inside thetrash:///folder.The format of the returned string is
YYYY-MM-DDThh:mm:ss.Corresponding
GFileAttributeTypeisFileAttributeType.STRING.- Since:
- 2.24
- See Also:
-
FILE_ATTRIBUTE_TRASH_ITEM_COUNT
A key in the "trash" namespace for getting the number of (toplevel) items that are present in thetrash:///folder.Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_TRASH_ORIG_PATH
A key in the "trash" namespace for getting the original path of a file inside thetrash:///folder before it was trashed.Corresponding
GFileAttributeTypeisFileAttributeType.BYTE_STRING.- Since:
- 2.24
- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT64.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT64.- See Also:
-
FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT
A key in the "unix" namespace for checking if the file represents a UNIX mount point.This attribute is
trueif 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
GFileAttributeTypeisFileAttributeType.BOOLEAN.- See Also:
-
FILE_ATTRIBUTE_UNIX_MODE
A key in the "unix" namespace for getting the mode of the file (e.g. whether the file is a regular file, symlink, etc).See the documentation for
lstat(): this attribute is equivalent to thest_modemember ofstruct stat, and includes both the file type and permissions.This attribute is only available for UNIX file systems.
Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
FILE_ATTRIBUTE_UNIX_NLINK
A key in the "unix" namespace for getting the number of hard links for a file.See the documentation for
lstat().This attribute is only available for UNIX file systems.
Corresponding
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
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
GFileAttributeTypeisFileAttributeType.UINT32.- See Also:
-
MEMORY_MONITOR_EXTENSION_POINT_NAME
Extension point for memory usage monitoring functionality. See Extending GIO.- Since:
- 2.64
- See Also:
-
MENU_ATTRIBUTE_ACTION
The menu item attribute which holds the action name of the item. Action names are namespaced with an identifier for the action group in which the action resides. For example, "win." for window-specific actions and "app." for application-wide actions.See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().
- Since:
- 2.32
- See Also:
-
MENU_ATTRIBUTE_ACTION_NAMESPACE
The menu item attribute that holds the namespace for all action names in menus that are linked from this item.- Since:
- 2.36
- See Also:
-
MENU_ATTRIBUTE_ICON
The menu item attribute which holds the icon of the item.The icon is stored in the format returned by g_icon_serialize().
This attribute is intended only to represent 'noun' icons such as favicons for a webpage, or application icons. It should not be used for 'verbs' (ie: stock icons).
- Since:
- 2.38
- See Also:
-
MENU_ATTRIBUTE_LABEL
The menu item attribute which holds the label of the item.- Since:
- 2.32
- See Also:
-
MENU_ATTRIBUTE_TARGET
The menu item attribute which holds the target with which the item's action will be activated.See also g_menu_item_set_action_and_target()
- Since:
- 2.32
- See Also:
-
MENU_EXPORTER_MAX_SECTION_SIZE
public static final int MENU_EXPORTER_MAX_SECTION_SIZEThe maximum number of entries in a menu section supported by g_dbus_connection_export_menu_model().The exact value of the limit may change in future GLib versions.
- Since:
- 2.76
- See Also:
-
MENU_LINK_SECTION
The name of the link that associates a menu item with a section. The linked menu will usually be shown in place of the menu item, using the item's label as a header.See also g_menu_item_set_link().
- Since:
- 2.32
- See Also:
-
MENU_LINK_SUBMENU
The name of the link that associates a menu item with a submenu.See also g_menu_item_set_link().
- Since:
- 2.32
- See Also:
-
NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME
- See Also:
-
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
Extension point for power profile usage monitoring functionality. See Extending GIO.- Since:
- 2.70
- See Also:
-
PROXY_EXTENSION_POINT_NAME
Extension point for proxy functionality. See Extending GIO.- Since:
- 2.26
- See Also:
-
PROXY_RESOLVER_EXTENSION_POINT_NAME
Extension point for proxy resolving functionality. See Extending GIO.- See Also:
-
SETTINGS_BACKEND_EXTENSION_POINT_NAME
Extension point forGSettingsBackendfunctionality.- See Also:
-
TLS_BACKEND_EXTENSION_POINT_NAME
Extension point for TLS functionality viaGTlsBackend. See Extending GIO.- See Also:
-
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
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
Extension point forGVfsfunctionality. See Extending GIO.- See Also:
-
VOLUME_IDENTIFIER_KIND_CLASS
The string used to obtain the volume class with g_volume_get_identifier().Known volume classes include
device,network, andloop. Other classes may be added in the future.This is intended to be used by applications to classify
GVolumeinstances into different sections - for example a file manager or file chooser can use this information to shownetworkvolumes under a "Network" heading anddevicevolumes under a "Devices" heading.- See Also:
-
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
The string used to obtain a filesystem label with g_volume_get_identifier().- See Also:
-
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
The string used to obtain a Unix device path with g_volume_get_identifier().- See Also:
-
VOLUME_IDENTIFIER_KIND_UUID
The string used to obtain a UUID with g_volume_get_identifier().- See Also:
-
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 bybusType.When the operation is finished,
callbackwill 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- aGBusTypecancellable- aGCancellableornullcallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.26
-
busGetFinish
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
GDBusConnectionobject will (usually) have theGDBusConnection:exit-on-close property set totrue.- Parameters:
res- aGAsyncResultobtained from theGAsyncReadyCallbackpassed to g_bus_get()- Returns:
- a
GDBusConnectionornulliferroris set. Free with g_object_unref(). - Throws:
GErrorException- seeGError- Since:
- 2.26
-
busGetSync
public static DBusConnection busGetSync(BusType busType, @Nullable Cancellable cancellable) throws GErrorException Synchronously connects to the message bus specified bybusType.Note that the returned object may shared with other callers, e.g. if two separate parts of a process calls this function with the samebusType,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
GDBusConnectionobject will (usually) have theGDBusConnection:exit-on-close property set totrue.- Parameters:
busType- aGBusTypecancellable- aGCancellableornull- Returns:
- a
GDBusConnectionornulliferroris set. Free with g_object_unref(). - Throws:
GErrorException- seeGError- Since:
- 2.26
-
busOwnNameOnConnection
public static int busOwnNameOnConnection(DBusConnection connection, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version ofbusOwnNameOnConnection(org.gnome.gio.DBusConnection, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure)using closures instead of callbacks for easier binding in other languages.- Parameters:
connection- a bus connectionname- the well-known name to ownflags- a set of flags with ownership optionsnameAcquiredClosure- closure to invoke whennameis acquired, orNULLto ignorenameLostClosure- closure to invoke whennameis lost, orNULLto 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 ofbusOwnNameOnConnection(org.gnome.gio.DBusConnection, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure)using closures instead of callbacks for easier binding in other languages.- Parameters:
connection- a bus connectionname- the well-known name to ownflags- a set of flags with ownership optionsnameAcquiredClosure- closure to invoke whennameis acquired, orNULLto ignorenameLostClosure- closure to invoke whennameis lost, orNULLto 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.busOwnNameusing closures instead of callbacks for easier binding in other languages.- Parameters:
busType- the type of bus to own a name onname- the well-known name to ownflags- a set of flags with ownership optionsbusAcquiredClosure- closure to invoke when connected to the bus of typebusType,orNULLto ignorenameAcquiredClosure- closure to invoke whennameis acquired, orNULLto ignorenameLostClosure- closure to invoke whennameis lost, orNULLto 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.busOwnNameusing closures instead of callbacks for easier binding in other languages.- Parameters:
busType- the type of bus to own a name onname- the well-known name to ownflags- a set of flags with ownership optionsbusAcquiredClosure- closure to invoke when connected to the bus of typebusType,orNULLto ignorenameAcquiredClosure- closure to invoke whennameis acquired, orNULLto ignorenameLostClosure- closure to invoke whennameis lost, orNULLto 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.MainContextafter this function has returned. You should continue to iterate theGLib.MainContextuntil theGLib.DestroyNotifyfunction passed tobusOwnName(org.gnome.gio.BusType, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure, org.gnome.gobject.Closure)is called, in order to avoid memory leaks through callbacks queued on theGLib.MainContextafter it’s stopped being iterated.- Parameters:
ownerId- an identifier obtained frombusOwnName(org.gnome.gio.BusType, java.lang.String, java.util.Set<org.gnome.gio.BusNameOwnerFlags>, org.gnome.gobject.Closure, org.gnome.gobject.Closure, org.gnome.gobject.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
GMainContextafter this function has returned. You should continue to iterate theGMainContextuntil theGDestroyNotifyfunction passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on theGMainContextafter 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- AGDBusConnection.name- The name (well-known or unique) to watch.flags- Flags from theGBusNameWatcherFlagsenumeration.nameAppearedClosure-GClosureto invoke whennameis known to exist ornull.nameVanishedClosure-GClosureto invoke whennameis known to not exist ornull.- 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- AGDBusConnection.name- The name (well-known or unique) to watch.flags- Flags from theGBusNameWatcherFlagsenumeration.nameAppearedClosure-GClosureto invoke whennameis known to exist ornull.nameVanishedClosure-GClosureto invoke whennameis known to not exist ornull.- 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 theGBusNameWatcherFlagsenumeration.nameAppearedClosure-GClosureto invoke whennameis known to exist ornull.nameVanishedClosure-GClosureto invoke whennameis known to not exist ornull.- 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 theGBusNameWatcherFlagsenumeration.nameAppearedClosure-GClosureto invoke whennameis known to exist ornull.nameVanishedClosure-GClosureto invoke whennameis known to not exist ornull.- Returns:
- An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
- Since:
- 2.26
-
contentTypeCanBeExecutable
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:
trueif the file type corresponds to a type that can be executable,falseotherwise.
-
contentTypeEquals
-
contentTypeFromMimeType
-
contentTypeGetDescription
-
contentTypeGetGenericIconName
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,ornullif unknown. Free with g_free() - Since:
- 2.34
-
contentTypeGetIcon
-
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 anymime/subdirectory, and with the first directory to try listed first- Since:
- 2.60
-
contentTypeGetMimeType
-
contentTypeGetSymbolicIcon
-
contentTypeGuess
public static String contentTypeGuess(@Nullable String filename, @org.jspecify.annotations.Nullable byte @Nullable [] data, @Nullable Out<Boolean> resultUncertain) Guesses the content type based on example data. If the function is uncertain,resultUncertainwill be set totrue. Eitherfilenameordatamay benull, in which case the guess will be based solely on the other argument.- Parameters:
filename- a path, ornulldata- a stream of data, ornullresultUncertain- return location for the certainty of the result, ornull- Returns:
- a string indicating a guessed content type for the given data. Free with g_free()
-
contentTypeGuessForTree
Tries to guess the type of the tree with rootroot,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
-
contentTypeIsMimeType
Determines iftypeis a subset ofmimeType.Convenience wrapper around g_content_type_is_a().- Parameters:
type- a content type stringmimeType- a mime type string- Returns:
trueiftypeis a kind ofmimeType,falseotherwise.- Since:
- 2.52
-
contentTypeIsUnknown
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:
trueif the type is the unknown type.
-
contentTypeSetMimeDirs
Set the list of directories used by GIO to load the MIME database. Ifdirsisnull, the directories used are the default:- the
mimesubdirectory of the directory in$XDG_DATA_HOME - the
mimesubdirectory of every directory in$XDG_DATA_DIRS
This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data.
Typically, in case your tests use
G_TEST_OPTION_ISOLATE_DIRS, but they depend on the system’s MIME database, you should call this function withdirsset tonullbefore 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 anymime/subdirectory, and with the first directory to try listed first- Since:
- 2.60
- the
-
contentTypesGetRegistered
-
dbusAddressEscapeValue
Escapestringso it can appear in a D-Bus address as the value part of a key-value pair.For instance, if
stringis/run/bus-for-:0, this function would return/run/bus-for-%3A0, which could be used in a D-Bus address likeunix: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
stringwith 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 bybusType.This may involve using various platform specific mechanisms.The returned address will be in the D-Bus address format.
- Parameters:
busType- aGBusTypecancellable- aGCancellableornull- Returns:
- a valid D-Bus address string for
busTypeornulliferroris set - Throws:
GErrorException- seeGError- Since:
- 2.26
-
dbusAddressGetStream
public static void dbusAddressGetStream(String address, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously connects to an endpoint specified byaddressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.addressmust be in the D-Bus address format.When the operation is finished,
callbackwill 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- AGCancellableornull.callback- AGAsyncReadyCallbackto 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
outGuidmay be set tonulleven on success.- Parameters:
res- AGAsyncResultobtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().outGuid-nullor return location to store the GUID extracted fromaddress,if any.- Returns:
- A
GIOStreamornulliferroris set. - Throws:
GErrorException- seeGError- 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 byaddressand sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.addressmust be in the D-Bus address format.A server is not required to set a GUID, so
outGuidmay be set tonulleven 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-nullor return location to store the GUID extracted fromaddress,if any.cancellable- AGCancellableornull.- Returns:
- A
GIOStreamornulliferroris set. - Throws:
GErrorException- seeGError- Since:
- 2.26
-
dbusEscapeObjectPath
-
dbusEscapeObjectPathBytestring
public static String dbusEscapeObjectPathBytestring(@org.jspecify.annotations.Nullable byte @Nullable [] bytes) Escapesbytesfor use in a D-Bus object path component.bytesis 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.bazwill becomefoo_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
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
Converts aGValueto aGVariantof the type indicated by thetypeparameter.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: AnyGVariantType
This can fail if e.g.
gvalueis of typeG_TYPE_STRINGandtypeis 'i', i.e.G_VARIANT_TYPE_INT32. It will also fail for anyGType(including e.g.G_TYPE_OBJECTandG_TYPE_BOXEDderived-types) not in the table above.Note that if
gvalueis of typeG_TYPE_VARIANTand its value isnull, the emptyGVariantinstance (nevernull) fortypeis 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
GVariantto aGValue.- Parameters:
gvalue- AGValueto convert to aGVarianttype- AGVariantType- Returns:
- A
GVariant(never floating) ofGVariantTypetypeholding the data fromgvalueor an emptyGVariantin case of failure. Free with g_variant_unref(). - Since:
- 2.30
-
dbusGvariantToGvalue
Converts aGVariantto aGValue. Ifvalueis 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
GVariantcontaining any basic or string array type will be converted to aGValuecontaining a basic value or string array. Any otherGVariant(handle, variant, tuple, dict entry) will be converted to aGValuecontaining thatGVariant.The conversion never fails - a valid
GValueis always returned inoutGvalue.- Parameters:
value- AGVariant.outGvalue- Return location pointing to a zero-filled (uninitialized)GValue.- Since:
- 2.30
-
dbusIsAddress
Checks ifstringis a D-Bus address.This doesn't check if
stringis actually supported byGDBusServerorGDBusConnection- use g_dbus_is_supported_address() to do more checks.- Parameters:
string- A string.- Returns:
trueifstringis a valid D-Bus address,falseotherwise.- Since:
- 2.26
-
dbusIsErrorName
Check whetherstringis 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:
trueif valid,falseotherwise.- Since:
- 2.70
-
dbusIsGuid
Checks ifstringis 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:
trueifstringis a GUID,falseotherwise.- Since:
- 2.26
-
dbusIsInterfaceName
Checks ifstringis a valid D-Bus interface name.- Parameters:
string- The string to check.- Returns:
trueif valid,falseotherwise.- Since:
- 2.26
-
dbusIsMemberName
Checks ifstringis a valid D-Bus member (e.g. signal or method) name.- Parameters:
string- The string to check.- Returns:
trueif valid,falseotherwise.- Since:
- 2.26
-
dbusIsName
Checks ifstringis a valid D-Bus bus name (either unique or well-known).- Parameters:
string- The string to check.- Returns:
trueif valid,falseotherwise.- Since:
- 2.26
-
dbusIsSupportedAddress
Like g_dbus_is_address() but also checks if the library supports the transports instringand that key/value pairs for each transport are valid. See the specification of the D-Bus address format.- Parameters:
string- A string.- Returns:
trueifstringis a valid D-Bus address that is supported by this library,falseiferroris set.- Throws:
GErrorException- seeGError- Since:
- 2.26
-
dbusIsUniqueName
Checks ifstringis a valid D-Bus unique bus name.- Parameters:
string- The string to check.- Returns:
trueif valid,falseotherwise.- Since:
- 2.26
-
dbusUnescapeObjectPath
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 returnsnull.Encoding alphanumeric characters which do not need to be encoded is not allowed (e.g
_63is not valid, the string should containcinstead).- Parameters:
s- the string to unescape- Returns:
- an
unescaped version of
s,ornullifsis not a string returned from g_dbus_escape_object_path(). Free with g_free(). - Since:
- 2.68
-
ioErrorFromErrno
Convertserrno.herror codes into GIO error codes.The fallback value
IOErrorEnum.FAILEDis returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).As
errnois 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 oferrno: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:
GIOErrorEnumvalue for the givenerrno.herror number
-
ioErrorFromFileError
ConvertsGFileErrorerror codes into GIO error codes.- Parameters:
fileError- aGFileError.- Returns:
GIOErrorEnumvalue for the givenGFileErrorerror value.- Since:
- 2.74
-
ioErrorQuark
-
ioModulesLoadAllInDirectory
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
GIOModulesloaded 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
GIOModulesloaded 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
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
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.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
GCancellablewas passed into g_io_scheduler_push_job(). -
ioSchedulerPushJob
@Deprecated public static void ioSchedulerPushJob(@Nullable IOSchedulerJobFunc jobFunc, int ioPriority, @Nullable Cancellable cancellable) Deprecated.useGThreadPoolor g_task_run_in_thread()Schedules the I/O job to run in another thread.notifywill be called onuserDataafterjobFunchas returned, regardless whether the job was cancelled or has run to completion.If
cancellableis notnull, 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- aGIOSchedulerJobFunc.ioPriority- the I/O priority of the request.cancellable- optionalGCancellableobject,nullto ignore.
-
keyfileSettingsBackendNew
public static SettingsBackend keyfileSettingsBackendNew(String filename, String rootPath, @Nullable String rootGroup) Creates a keyfile-backedSettingsBackend.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).rootPathmay be"/".If
rootGroupis non-NULLthen it specifies the name of the keyfile group used for keys that are written directly belowrootPath.For example, ifrootPathis"/apps/example/"androotGroupis"toplevel", then setting the key"/apps/example/enabled"to true will cause the following to appear in the keyfile:[toplevel] enabled=trueIf
rootGroupisNULLthen it is not permitted to store keys directly below therootPath.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 to12then the following would appear in the keyfile:[profiles/default] font-size=12The backend will refuse writes (and return writability as being false) for keys outside of
rootPathand, in the event thatrootGroupisNULL, also for keys directly underrootPath.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
defaultsin the directory specified by theGKeyfileSettingsBackend:defaults-dirproperty, and a list of locked keys from a text file with the namelocksin the same location.- Parameters:
filename- the filename of the keyfilerootPath- the path under which all settings keys appearrootGroup- the group name corresponding torootPath,orNULLto disallow storing keys directly beneathrootPath- Returns:
- a keyfile-backed
SettingsBackend
-
memorySettingsBackendNew
Creates a memory-backedGSettingsBackend.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
Creates a readonlyGSettingsBackend.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
Utility method forGPollableInputStreamandGPollableOutputStreamimplementations. Creates a newGSourcethat expects a callback of typeGPollableSourceFunc. 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 forGPollableInputStreamandGPollableOutputStreamimplementations. Creates a newGSource, as with g_pollable_source_new(), but also attachingchildSource(with a dummy callback), andcancellable,if they are non-null.- Parameters:
pollableStream- the stream associated with the new sourcechildSource- optional child source to attachcancellable- optionalGCancellableto attach- Returns:
- the new
GSource. - Since:
- 2.34
-
pollableStreamRead
public static long pollableStreamRead(InputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) throws GErrorException Tries to read fromstream,as with g_input_stream_read() (ifblockingistrue) or g_pollable_input_stream_read_nonblocking() (ifblockingisfalse). This can be used to more easily share code between blocking and non-blocking implementations of a method.If
blockingisfalse, thenstreammust be aGPollableInputStreamfor which g_pollable_input_stream_can_poll() returnstrue, or else the behavior is undefined. Ifblockingistrue, thenstreamdoes not need to be aGPollableInputStream.- Parameters:
stream- aGInputStreambuffer- a buffer to read data intoblocking- whether to do blocking I/Ocancellable- optionalGCancellableobject,nullto ignore.- Returns:
- the number of bytes read, or -1 on error.
- Throws:
GErrorException- seeGError- Since:
- 2.34
-
pollableStreamWrite
public static long pollableStreamWrite(OutputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, @Nullable Cancellable cancellable) throws GErrorException Tries to write tostream,as with g_output_stream_write() (ifblockingistrue) or g_pollable_output_stream_write_nonblocking() (ifblockingisfalse). This can be used to more easily share code between blocking and non-blocking implementations of a method.If
blockingisfalse, thenstreammust be aGPollableOutputStreamfor which g_pollable_output_stream_can_poll() returnstrueor else the behavior is undefined. Ifblockingistrue, thenstreamdoes not need to be aGPollableOutputStream.- Parameters:
stream- aGOutputStream.buffer- the buffer containing the data to write.blocking- whether to do blocking I/Ocancellable- optionalGCancellableobject,nullto ignore.- Returns:
- the number of bytes written, or -1 on error.
- Throws:
GErrorException- seeGError- Since:
- 2.34
-
pollableStreamWriteAll
public static boolean pollableStreamWriteAll(OutputStream stream, @org.jspecify.annotations.Nullable byte @Nullable [] buffer, boolean blocking, Out<Long> bytesWritten, @Nullable Cancellable cancellable) throws GErrorException Tries to writecountbytes tostream,as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write().On a successful write of
countbytes,trueis returned, andbytesWrittenis set tocount.If there is an error during the operation (including
IOErrorEnum.WOULD_BLOCKin the non-blocking case),falseis returned anderroris set to indicate the error status,bytesWrittenis updated to contain the number of bytes written into the stream before the error occurred.As with g_pollable_stream_write(), if
blockingisfalse, thenstreammust be aGPollableOutputStreamfor which g_pollable_output_stream_can_poll() returnstrueor else the behavior is undefined. Ifblockingistrue, thenstreamdoes not need to be aGPollableOutputStream.- Parameters:
stream- aGOutputStream.buffer- the buffer containing the data to write.blocking- whether to do blocking I/ObytesWritten- location to store the number of bytes that was written to the streamcancellable- optionalGCancellableobject,nullto ignore.- Returns:
trueon success,falseif there was an error- Throws:
GErrorException- seeGError- Since:
- 2.34
-
resourcesEnumerateChildren
public static String[] resourcesEnumerateChildren(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Returns all the names of children at the specifiedpathin the set of globally registered resources.The return result is a
NULLterminated list of strings which should be released withGLib.strfreev(java.lang.foreign.MemorySegment).lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
- an array of constant strings
- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesEnumerateChildren
public static String[] resourcesEnumerateChildren(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Returns all the names of children at the specifiedpathin the set of globally registered resources.The return result is a
NULLterminated list of strings which should be released withGLib.strfreev(java.lang.foreign.MemorySegment).lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
- an array of constant strings
- Throws:
GErrorException- seeGError- 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 specifiedpathin the set of globally registered resources and if found returns information about it.lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlagssize- a location to place the length of the contents of the file, orNULLif the length is not neededflags- a location to place theGio.ResourceFlagsabout the file, orNULLif the flags are not needed- Returns:
TRUEif the file was found,FALSEif there were errors- Throws:
GErrorException- seeGError- 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 specifiedpathin the set of globally registered resources and if found returns information about it.lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlagssize- a location to place the length of the contents of the file, orNULLif the length is not neededflags- a location to place theGio.ResourceFlagsabout the file, orNULLif the flags are not needed- Returns:
TRUEif the file was found,FALSEif there were errors- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesHasChildren
Returns whether the specifiedpathin the set of globally registered resources has children.- Parameters:
path- A pathname- Returns:
trueifpatchhas children- Since:
- 2.84
-
resourcesLookupData
public static byte[] resourcesLookupData(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Looks for a file at the specifiedpathin the set of globally registered resources and returns aGLib.Bytesthat 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.
lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
GLib.BytesorNULLon error- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesLookupData
public static byte[] resourcesLookupData(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Looks for a file at the specifiedpathin the set of globally registered resources and returns aGLib.Bytesthat 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.
lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
GLib.BytesorNULLon error- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesOpenStream
public static InputStream resourcesOpenStream(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Looks for a file at the specifiedpathin the set of globally registered resources and returns aInputStreamthat lets you read the data.lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
InputStreamorNULLon error- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesOpenStream
public static InputStream resourcesOpenStream(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Looks for a file at the specifiedpathin the set of globally registered resources and returns aInputStreamthat lets you read the data.lookupFlagscontrols the behaviour of the lookup.- Parameters:
path- A path name inside the resourcelookupFlags- AGio.ResourceLookupFlags- Returns:
InputStreamorNULLon error- Throws:
GErrorException- seeGError- Since:
- 2.32
-
resourcesRegister
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(java.lang.String, java.util.Set<org.gnome.gio.ResourceLookupFlags>).- Parameters:
resource- AGio.Resource- Since:
- 2.32
-
resourcesUnregister
Unregisters the resource from the process-global set of resources.- Parameters:
resource- AGio.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 theGAsyncResultwith the given error information.- Parameters:
object- aGObject, ornull.callback- aGAsyncReadyCallback.domain- aGQuarkcontaining the error domain (usuallyG_IO_ERROR).code- a specific error code.format- a formatted error reporting string.varargs- a list of variables to fill informat.
-
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 aGErrorrather than building a new one.- Parameters:
object- aGObject, ornullcallback- aGAsyncReadyCallback.error- theGErrorto 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 oferror,so the caller does not have to free it any more.- Parameters:
object- aGObject, ornullcallback- aGAsyncReadyCallback.error- theGErrorto report- Since:
- 2.28
-
ioErrorFromWin32Error
Converts some common error codes (as returned from GetLastError() or WSAGetLastError()) into GIO error codes. The fallback valueIOErrorEnum.FAILEDis 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:
GIOErrorEnumvalue for the given error number.- Since:
- 2.26
-