Class Gio
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The value returned by handlers of the signals generated by thegdbus-codegen
tool to indicate that a method call has been handled by an implementation.static final boolean
The value returned by handlers of the signals generated by thegdbus-codegen
tool to indicate that a method call has not been handled by an implementation.static final String
Extension point for debug control functionality.static final String
Extension point for default handler to URI association.static final String
The string used to obtain a Unix device path with g_drive_get_identifier().static final String
A key in the "access" namespace for checking deletion privileges.static final String
A key in the "access" namespace for getting execution privileges.static final String
A key in the "access" namespace for getting read privileges.static final String
A key in the "access" namespace for checking renaming privileges.static final String
A key in the "access" namespace for checking trashing privileges.static final String
A key in the "access" namespace for getting write privileges.static final String
A key in the "dos" namespace for checking if the file's archive flag is set.static final String
A key in the "dos" namespace for checking if the file is a NTFS mount point (a volume mount or a junction point).static final String
A key in the "dos" namespace for checking if the file's backup flag is set.static final String
A key in the "dos" namespace for getting the file NTFS reparse tag.static final String
A key in the "etag" namespace for getting the value of the file's entity tag.static final String
A key in the "filesystem" namespace for getting the number of bytes of free space left on the file system.static final String
A key in the "filesystem" namespace for checking if the file system is read only.static final String
A key in the "filesystem" namespace for checking if the file system is remote.static final String
A 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 String
A key in the "filesystem" namespace for getting the file system's type.static final String
A key in the "filesystem" namespace for hinting a file manager application whether it should preview (e.g.static final String
A key in the "filesystem" namespace for getting the number of bytes used by data on the file system.static final String
A key in the "gvfs" namespace that gets the name of the current GVFS backend in use.static final String
A key in the "id" namespace for getting a file identifier.static final String
A key in the "id" namespace for getting the file system identifier.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started degraded.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable.static final String
A key in the "mountable" namespace for getting the HAL UDI for the mountable file.static final String
A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is automatically polled for media.static final String
A key in the "mountable" namespace for getting theGDriveStartStopType
.static final String
A key in the "mountable" namespace for getting the unix device.static final String
A key in the "mountable" namespace for getting the unix device file.static final String
A key in the "owner" namespace for getting the file owner's group.static final String
A key in the "owner" namespace for getting the user name of the file's owner.static final String
A key in the "owner" namespace for getting the real name of the user that owns the file.static final String
A key in the "preview" namespace for getting aGIcon
that can be used to get preview of the file.static final String
A key in the "recent" namespace for getting time, when the metadata for the file inrecent:///
was last changed.static final String
A key in the "selinux" namespace for getting the file's SELinux context.static final String
A key in the "standard" namespace for getting the amount of disk space that is consumed by the file (in bytes).static final String
A key in the "standard" namespace for getting the content type of the file.static final String
A key in the "standard" namespace for getting the copy name of the file.static final String
A key in the "standard" namespace for getting the description of the file.static final String
A key in the "standard" namespace for getting the display name of the file.static final String
A key in the "standard" namespace for edit name of the file.static final String
A key in the "standard" namespace for getting the fast content type.static final String
A key in the "standard" namespace for getting the icon for the file.static final String
A key in the "standard" namespace for checking if a file is a backup file.static final String
A key in the "standard" namespace for checking if a file is hidden.static final String
A key in the "standard" namespace for checking if the file is a symlink.static final String
A key in the "standard" namespace for checking if a file is virtual.static final String
A key in the "standard" namespace for checking if a file is volatile.static final String
A key in the "standard" namespace for getting the name of the file.static final String
A key in the "standard" namespace for getting the file's size (in bytes).static final String
A key in the "standard" namespace for setting the sort order of a file.static final String
A key in the "standard" namespace for getting the symbolic icon for the file.static final String
A key in the "standard" namespace for getting the symlink target, if the file is a symlink.static final String
A key in the "standard" namespace for getting the target URI for the file, in the case ofFileType.SHORTCUT
orFileType.MOUNTABLE
files.static final String
A key in the "standard" namespace for storing file types.static final String
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.static final String
A key in the "thumbnail" namespace for checking whether the large thumbnail is outdated.static final String
A key in the "thumbnail" namespace for checking whether the normal thumbnail is outdated.static final String
A key in the "thumbnail" namespace for checking whether the x-large thumbnail is outdated.static final String
A key in the "thumbnail" namespace for checking whether the xx-large thumbnail is outdated.static final String
A key in the "thumbnail" namespace for getting the path to the thumbnail image with the biggest size available.static final String
A key in the "thumbnail" namespace for getting the path to the large thumbnail image.static final String
A key in the "thumbnail" namespace for getting the path to the normal thumbnail image.static final String
A key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.static final String
A key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.static final String
A key in the "thumbnail" namespace for checking if thumbnailing failed.static final String
A key in the "thumbnail" namespace for checking if thumbnailing failed for the large image.static final String
A key in the "thumbnail" namespace for checking if thumbnailing failed for the normal image.static final String
A key in the "thumbnail" namespace for checking if thumbnailing failed for the x-large image.static final String
A key in the "thumbnail" namespace for checking if thumbnailing failed for the xx-large image.static final String
A key in the "time" namespace for getting the time the file was last accessed.static final String
A key in the "time" namespace for getting the nanoseconds of the time the file was last accessed.static final String
A key in the "time" namespace for getting the microseconds of the time the file was last accessed.static final String
A key in the "time" namespace for getting the time the file was last changed.static final String
A key in the "time" namespace for getting the nanoseconds of the time the file was last changed.static final String
A key in the "time" namespace for getting the microseconds of the time the file was last changed.static final String
A key in the "time" namespace for getting the time the file was created.static final String
A key in the "time" namespace for getting the nanoseconds of the time the file was created.static final String
A key in the "time" namespace for getting the microseconds of the time the file was created.static final String
A key in the "time" namespace for getting the time the file was last modified.static final String
A key in the "time" namespace for getting the nanoseconds of the time the file was last modified.static final String
A key in the "time" namespace for getting the microseconds of the time the file was last modified.static final String
A key in the "trash" namespace for getting the deletion date and time of a file inside thetrash:///
folder.static final String
A key in the "trash" namespace for getting the number of (toplevel) items that are present in thetrash:///
folder.static final String
A key in the "trash" namespace for getting the original path of a file inside thetrash:///
folder before it was trashed.static final String
A key in the "unix" namespace for getting the block size for the file system.static final String
A key in the "unix" namespace for getting the number of blocks allocated for the file.static final String
A key in the "unix" namespace for getting the device id of the device the file is located on (see stat() documentation).static final String
A key in the "unix" namespace for getting the group ID for the file.static final String
A key in the "unix" namespace for getting the inode of the file.static final String
A key in the "unix" namespace for checking if the file represents a UNIX mount point.static final String
A key in the "unix" namespace for getting the mode of the file (e.g.static final String
A key in the "unix" namespace for getting the number of hard links for a file.static final String
A key in the "unix" namespace for getting the device ID for the file (if it is a special file).static final String
A key in the "unix" namespace for getting the user ID for the file.static final String
Extension point for memory usage monitoring functionality.static final String
The menu item attribute which holds the action name of the item.static final String
The menu item attribute that holds the namespace for all action names in menus that are linked from this item.static final String
The menu item attribute which holds the icon of the item.static final String
The menu item attribute which holds the label of the item.static final String
The menu item attribute which holds the target with which the item's action will be activated.static final int
The maximum number of entries in a menu section supported by g_dbus_connection_export_menu_model().static final String
The name of the link that associates a menu item with a section.static final String
The name of the link that associates a menu item with a submenu.static final String
static final String
Extension point for network status monitoring functionality.static final String
Extension point for power profile usage monitoring functionality.static final String
Extension point for proxy functionality.static final String
Extension point for proxy resolving functionality.static final String
Extension point forGSettingsBackend
functionality.static final String
Extension point for TLS functionality viaGTlsBackend
.static final String
The purpose used to verify the client certificate in a TLS connection.static final String
The purpose used to verify the server certificate in a TLS connection.static final String
Extension point forGVfs
functionality.static final String
The string used to obtain the volume class with g_volume_get_identifier().static final String
The string used to obtain a Hal UDI with g_volume_get_identifier().static final String
The string used to obtain a filesystem label with g_volume_get_identifier().static final String
The string used to obtain a NFS mount with g_volume_get_identifier().static final String
The string used to obtain a Unix device path with g_volume_get_identifier().static final String
The string used to obtain a UUID with g_volume_get_identifier().static final String
Extension point for volume monitor functionality. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
busGet
(BusType busType, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously connects to the message bus specified bybusType
.static DBusConnection
busGetFinish
(AsyncResult res) Finishes an operation started with g_bus_get().static DBusConnection
busGetSync
(BusType busType, @Nullable Cancellable cancellable) Synchronously connects to the message bus specified bybusType
.static int
busOwnName
(BusType busType, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages.static int
busOwnName
(BusType busType, String name, BusNameOwnerFlags flags, @Nullable Closure busAcquiredClosure, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of g_bus_own_name() using closures instead of callbacks for easier binding in other languages.static int
busOwnNameOnConnection
(DBusConnection connection, String name, Set<BusNameOwnerFlags> flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.static int
busOwnNameOnConnection
(DBusConnection connection, String name, BusNameOwnerFlags flags, @Nullable Closure nameAcquiredClosure, @Nullable Closure nameLostClosure) Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.static void
busUnownName
(int ownerId) Stops owning a name.static void
busUnwatchName
(int watcherId) Stops watching a name.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.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.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.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.static boolean
Checks if a content type can be executable.static boolean
contentTypeEquals
(String type1, String type2) Compares two content types for equality.static String
contentTypeFromMimeType
(String mimeType) Tries to find a content type based on the mime type name.static String
Gets the human readable description of the content type.static String
Gets the generic icon name for a content type.static Icon
contentTypeGetIcon
(String type) Gets the icon for a content type.static String[]
Get the list of directories which MIME data is loaded from.static String
contentTypeGetMimeType
(String type) Gets the mime type for the content type, if one is registered.static Icon
Gets the symbolic icon for a content type.static String
contentTypeGuess
(@Nullable String filename, @org.jetbrains.annotations.Nullable byte[] 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 boolean
contentTypeIsA
(String type, String supertype) Determines iftype
is a subset ofsupertype
.static boolean
contentTypeIsMimeType
(String type, String mimeType) Determines iftype
is a subset ofmimeType
.static boolean
contentTypeIsUnknown
(String type) Checks if the content type is the generic "unknown" type.static void
contentTypeSetMimeDirs
(@Nullable String[] 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 String
dbusAddressEscapeValue
(String string) Escapestring
so it can appear in a D-Bus address as the value part of a key-value pair.static String
dbusAddressGetForBusSync
(BusType busType, @Nullable Cancellable cancellable) Synchronously looks up the D-Bus address for the well-known message bus instance specified bybusType
.static void
dbusAddressGetStream
(String address, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously connects to an endpoint specified byaddress
and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.static IOStream
dbusAddressGetStreamFinish
(AsyncResult res, @Nullable Out<String> outGuid) Finishes an operation started with g_dbus_address_get_stream().static IOStream
dbusAddressGetStreamSync
(String address, @Nullable Out<String> outGuid, @Nullable Cancellable cancellable) Synchronously connects to an endpoint specified byaddress
and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.static String
This is a language binding friendly version of g_dbus_escape_object_path_bytestring().static String
dbusEscapeObjectPathBytestring
(byte[] bytes) Escapesbytes
for use in a D-Bus object path component.static String
Generate a D-Bus GUID that can be used with e.g.static Variant
dbusGvalueToGvariant
(Value gvalue, VariantType type) Converts aGValue
to aGVariant
of the type indicated by thetype
parameter.static void
dbusGvariantToGvalue
(Variant value, Value outGvalue) Converts aGVariant
to aGValue
.static boolean
dbusIsAddress
(String string) Checks ifstring
is a D-Bus address.static boolean
dbusIsErrorName
(String string) Check whetherstring
is a valid D-Bus error name.static boolean
dbusIsGuid
(String string) Checks ifstring
is a D-Bus GUID.static boolean
dbusIsInterfaceName
(String string) Checks ifstring
is a valid D-Bus interface name.static boolean
dbusIsMemberName
(String string) Checks ifstring
is a valid D-Bus member (e.g.static boolean
dbusIsName
(String string) Checks ifstring
is a valid D-Bus bus name (either unique or well-known).static boolean
dbusIsSupportedAddress
(String string) Like g_dbus_is_address() but also checks if the library supports the transports instring
and that key/value pairs for each transport are valid.static boolean
dbusIsUniqueName
(String string) Checks ifstring
is a valid D-Bus unique bus name.static byte[]
Unescapes an string that was previously escaped with g_dbus_escape_object_path().static IOErrorEnum
ioErrorFromErrno
(int errNo) Convertserrno.h
error codes into GIO error codes.static IOErrorEnum
ioErrorFromFileError
(FileError fileError) ConvertsGFileError
error codes into GIO error codes.static IOErrorEnum
ioErrorFromWin32Error
(int errorCode) Converts some common error codes (as returned from GetLastError() or WSAGetLastError()) into GIO error codes.static Quark
Gets 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 void
ioModulesScanAllInDirectory
(String dirname) Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.static void
ioModulesScanAllInDirectoryWithScope
(String dirname, IOModuleScope scope) Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered.static void
Deprecated.You should never call this function, since you don't know how other libraries in your program might be making use of gioscheduler.static void
ioSchedulerPushJob
(IOSchedulerJobFunc jobFunc, int ioPriority, @Nullable Cancellable cancellable) Deprecated.useGThreadPool
or g_task_run_in_thread()static void
static SettingsBackend
keyfileSettingsBackendNew
(String filename, String rootPath, @Nullable String rootGroup) Creates a keyfile-backedGSettingsBackend
.static SettingsBackend
Creates a memory-backedGSettingsBackend
.static void
Initializes the platform networking libraries (eg, on Windows, this calls WSAStartup()).static SettingsBackend
Creates a readonlyGSettingsBackend
.static Source
pollableSourceNew
(GObject pollableStream) Utility method forGPollableInputStream
andGPollableOutputStream
implementations.static Source
pollableSourceNewFull
(GObject pollableStream, @Nullable Source childSource, @Nullable Cancellable cancellable) Utility method forGPollableInputStream
andGPollableOutputStream
implementations.static long
pollableStreamRead
(InputStream stream, byte[] buffer, boolean blocking, @Nullable Cancellable cancellable) Tries to read fromstream
, as with g_input_stream_read() (ifblocking
istrue
) or g_pollable_input_stream_read_nonblocking() (ifblocking
isfalse
).static long
pollableStreamWrite
(OutputStream stream, byte[] buffer, boolean blocking, @Nullable Cancellable cancellable) Tries to write tostream
, as with g_output_stream_write() (ifblocking
istrue
) or g_pollable_output_stream_write_nonblocking() (ifblocking
isfalse
).static boolean
pollableStreamWriteAll
(OutputStream stream, byte[] buffer, boolean blocking, Out<Long> bytesWritten, @Nullable Cancellable cancellable) Tries to writecount
bytes tostream
, as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write().static SettingsBackend
registrySettingsBackendNew
(@Nullable String registryKey) IfregistryKey
isnull
then the default pathHKEY_CURRENT_USER\\Software\\GSettings
is used.static String[]
resourcesEnumerateChildren
(String path, Set<ResourceLookupFlags> lookupFlags) Returns all the names of children at the specifiedpath
in the set of globally registered resources.static String[]
resourcesEnumerateChildren
(String path, ResourceLookupFlags... lookupFlags) Returns all the names of children at the specifiedpath
in the set of globally registered resources.static boolean
resourcesGetInfo
(String path, Set<ResourceLookupFlags> lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) Looks for a file at the specifiedpath
in the set of globally registered resources and if found returns information about it.static boolean
resourcesGetInfo
(String path, ResourceLookupFlags lookupFlags, @Nullable Out<Long> size, @Nullable Out<Integer> flags) Looks for a file at the specifiedpath
in the set of globally registered resources and if found returns information about it.static Bytes
resourcesLookupData
(String path, Set<ResourceLookupFlags> lookupFlags) Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGBytes
that lets you directly access the data in memory.static Bytes
resourcesLookupData
(String path, ResourceLookupFlags... lookupFlags) Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGBytes
that lets you directly access the data in memory.static InputStream
resourcesOpenStream
(String path, Set<ResourceLookupFlags> lookupFlags) Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGInputStream
that lets you read the data.static InputStream
resourcesOpenStream
(String path, ResourceLookupFlags... lookupFlags) Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGInputStream
that lets you read the data.static void
resourcesRegister
(Resource resource) Registers the resource with the process-global set of resources.static void
resourcesUnregister
(Resource resource) Unregisters the resource from the process-global set of resources.static void
simpleAsyncReportErrorInIdle
(@Nullable GObject object, @Nullable AsyncReadyCallback callback, Quark domain, int code, String format, Object... varargs) Deprecated.Use g_task_report_error().static void
simpleAsyncReportGerrorInIdle
(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error) Deprecated.Use g_task_report_error().static void
simpleAsyncReportTakeGerrorInIdle
(@Nullable GObject object, @Nullable AsyncReadyCallback callback, GError error) Deprecated.Use g_task_report_error().static boolean
unixIsMountPathSystemInternal
(String mountPath) Determines ifmountPath
is considered an implementation of the OS.static boolean
unixIsSystemDevicePath
(String devicePath) Determines ifdevicePath
is considered a block device path which is only used in implementation of the OS.static boolean
unixIsSystemFsType
(String fsType) Determines iffsType
is considered a type of file system which is only used in implementation of the OS.static UnixMountEntry
unixMountAt
(String mountPath, @Nullable Out<Long> timeRead) Gets aGUnixMountEntry
for a given mount path.static int
unixMountCompare
(UnixMountEntry mount1, UnixMountEntry mount2) Compares two unix mounts.static UnixMountEntry
unixMountCopy
(UnixMountEntry mountEntry) Makes a copy ofmountEntry
.static UnixMountEntry
unixMountFor
(String filePath, @Nullable Out<Long> timeRead) Gets aGUnixMountEntry
for a given file path.static void
unixMountFree
(UnixMountEntry mountEntry) Frees a unix mount.static String
unixMountGetDevicePath
(UnixMountEntry mountEntry) Gets the device path for a unix mount.static String
unixMountGetFsType
(UnixMountEntry mountEntry) Gets the filesystem type for the unix mount.static String
unixMountGetMountPath
(UnixMountEntry mountEntry) Gets the mount path for a unix mount.static String
unixMountGetOptions
(UnixMountEntry mountEntry) Gets a comma-separated list of mount options for the unix mount.static String
unixMountGetRootPath
(UnixMountEntry mountEntry) Gets the root of the mount within the filesystem.static boolean
unixMountGuessCanEject
(UnixMountEntry mountEntry) Guesses whether a Unix mount can be ejected.static Icon
unixMountGuessIcon
(UnixMountEntry mountEntry) Guesses the icon of a Unix mount.static String
unixMountGuessName
(UnixMountEntry mountEntry) Guesses the name of a Unix mount.static boolean
unixMountGuessShouldDisplay
(UnixMountEntry mountEntry) Guesses whether a Unix mount should be displayed in the UI.static Icon
unixMountGuessSymbolicIcon
(UnixMountEntry mountEntry) Guesses the symbolic icon of a Unix mount.static boolean
unixMountIsReadonly
(UnixMountEntry mountEntry) Checks if a unix mount is mounted read only.static boolean
unixMountIsSystemInternal
(UnixMountEntry mountEntry) Checks if a Unix mount is a system mount.static boolean
unixMountPointsChangedSince
(long time) Checks if the unix mount points have changed since a given unix time.static List
<UnixMountPoint> unixMountPointsGet
(@Nullable Out<Long> timeRead) Gets aGList
ofGUnixMountPoint
containing the unix mount points.static UnixMountPoint[]
unixMountPointsGetFromFile
(String tablePath, @Nullable Out<Long> timeReadOut) Gets an array ofGio.UnixMountPoint
s containing the Unix mount points listed intablePath
.static boolean
unixMountsChangedSince
(long time) Checks if the unix mounts have changed since a given unix time.static List
<UnixMountEntry> unixMountsGet
(@Nullable Out<Long> timeRead) Gets aGList
ofGUnixMountEntry
containing the unix mounts.static UnixMountEntry[]
unixMountsGetFromFile
(String tablePath, @Nullable Out<Long> timeReadOut) Gets an array ofGio.UnixMountEntry
s containing the Unix mounts listed intablePath
.
-
Field Details
-
DBUS_METHOD_INVOCATION_HANDLED
public static final boolean DBUS_METHOD_INVOCATION_HANDLEDThe value returned by handlers of the signals generated by thegdbus-codegen
tool 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
true
instead, often written like this:g_dbus_method_invocation_return_error (invocation, ...); return TRUE; // handled
- See Also:
-
DBUS_METHOD_INVOCATION_UNHANDLED
public static final boolean DBUS_METHOD_INVOCATION_UNHANDLEDThe value returned by handlers of the signals generated by thegdbus-codegen
tool 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
false
instead.- See Also:
-
DEBUG_CONTROLLER_EXTENSION_POINT_NAME
Extension point for debug control functionality. See [Extending GIO][extending-gio].- See Also:
-
DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
The string used to obtain a Unix device path with g_drive_get_identifier().- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_DELETE
A key in the "access" namespace for checking deletion privileges.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if the user is able to move the file to the trash.- See Also:
-
FILE_ATTRIBUTE_ACCESS_CAN_WRITE
A key in the "access" namespace for getting write privileges.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.This attribute will be
true
if 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
true
if the archive flag is set.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeType
isFileAttributeType.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
true
if file is a reparse point of type IO_REPARSE_TAG_MOUNT_POINT.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if the backup flag is set.This attribute is only available for DOS file systems.
Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_ETAG_VALUE
A key in the "etag" namespace for getting the value of the file's entity tag.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
true
if the file system is read only.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_REMOTE
A key in the "filesystem" namespace for checking if the file system is remote.Is set to
true
if the file system is remote.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.UINT64
.- See Also:
-
FILE_ATTRIBUTE_FILESYSTEM_TYPE
A key in the "filesystem" namespace for getting the file system's type.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.UINT64
.- 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
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_ID_FILE
A key in the "id" namespace for getting a file identifier.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI
A key in the "mountable" namespace for getting the HAL UDI for the mountable file.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE
A key in the "mountable" namespace for getting theGDriveStartStopType
.Corresponding
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE
A key in the "mountable" namespace for getting the unix device.Corresponding
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
A key in the "mountable" namespace for getting the unix device file.Corresponding
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_OWNER_GROUP
A key in the "owner" namespace for getting the file owner's group.Corresponding
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_OWNER_USER
A key in the "owner" namespace for getting the user name of the file's owner.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_PREVIEW_ICON
A key in the "preview" namespace for getting aGIcon
that can be used to get preview of the file.For example, it may be a low resolution thumbnail without metadata.
Corresponding
GFileAttributeType
isFileAttributeType.OBJECT
.The value for this key should contain a
GIcon
.- 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
GFileAttributeType
isFileAttributeType.INT64
.- See Also:
-
FILE_ATTRIBUTE_SELINUX_CONTEXT
A key in the "selinux" namespace for getting the file's SELinux context.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.UINT64
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
A key in the "standard" namespace for getting the content type of the file.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_ICON
A key in the "standard" namespace for getting the icon for the file.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_HIDDEN
A key in the "standard" namespace for checking if a file is hidden.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL
A key in the "standard" namespace for checking if a file is virtual.Corresponding
GFileAttributeType
isFileAttributeType.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_TARGET
for the persistent URI.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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_NAME
if you need to display the name in a user interface.Corresponding
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_SIZE
A key in the "standard" namespace for getting the file's size (in bytes).Corresponding
GFileAttributeType
isFileAttributeType.UINT64
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_SORT_ORDER
A key in the "standard" namespace for setting the sort order of a file.Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.OBJECT
.The value for this key should contain a
GIcon
.- 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
GFileAttributeType
isFileAttributeType.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.SHORTCUT
orFileType.MOUNTABLE
files.Corresponding
GFileAttributeType
isFileAttributeType.STRING
.- See Also:
-
FILE_ATTRIBUTE_STANDARD_TYPE
A key in the "standard" namespace for storing file types.Corresponding
GFileAttributeType
isFileAttributeType.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
true
if thumbnailing failed.Corresponding
GFileAttributeType
isFileAttributeType.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
true
if thumbnailing failed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if thumbnailing failed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if thumbnailing failed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if thumbnailing failed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
A key in the "thumbnail" namespace for checking whether the thumbnail is outdated.This attribute is
true
if the thumbnail is up-to-date with the file it represents, andfalse
if the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED
istrue
and this attribute isfalse
, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if the large thumbnail is up-to-date with the file it represents, andfalse
if the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_LARGE
istrue
and this attribute isfalse
, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if the normal thumbnail is up-to-date with the file it represents, andfalse
if the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_NORMAL
istrue
and this attribute isfalse
, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if the x-large thumbnail is up-to-date with the file it represents, andfalse
if the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XLARGE
istrue
and this attribute isfalse
, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
true
if the x-large thumbnail is up-to-date with the file it represents, andfalse
if the file has been modified since the thumbnail was generated.If
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED_XXLARGE
istrue
and this attribute isfalse
, it indicates that thumbnailing may be attempted again and may succeed.Corresponding
GFileAttributeType
isFileAttributeType.BOOLEAN
.- 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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_NORMAL
A key in the "thumbnail" namespace for getting the path to the normal thumbnail image.Corresponding
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_XLARGE
A key in the "thumbnail" namespace for getting the path to the x-large thumbnail image.Corresponding
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- See Also:
-
FILE_ATTRIBUTE_THUMBNAIL_PATH_XXLARGE
A key in the "thumbnail" namespace for getting the path to the xx-large thumbnail image.Corresponding
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- See Also:
-
FILE_ATTRIBUTE_TIME_ACCESS
A key in the "time" namespace for getting the time the file was last accessed.Corresponding
GFileAttributeType
isFileAttributeType.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
. CorrespondingGFileAttributeType
isFileAttributeType.UINT32
.- 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
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_TIME_CHANGED
A key in the "time" namespace for getting the time the file was last changed.Corresponding
GFileAttributeType
isFileAttributeType.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
. CorrespondingGFileAttributeType
isFileAttributeType.UINT32
.- 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
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_TIME_CREATED
A key in the "time" namespace for getting the time the file was created.Corresponding
GFileAttributeType
isFileAttributeType.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_birthtime
or 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
. CorrespondingGFileAttributeType
isFileAttributeType.UINT32
.- 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
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
FILE_ATTRIBUTE_TIME_MODIFIED
A key in the "time" namespace for getting the time the file was last modified.Corresponding
GFileAttributeType
isFileAttributeType.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
. CorrespondingGFileAttributeType
isFileAttributeType.UINT32
.- 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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.STRING
.- 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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.BYTE_STRING
.- 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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
true
if the file is a UNIX mount point.Since 2.58,
/
is considered to be a mount point.This attribute is only available for UNIX file systems.
Corresponding
GFileAttributeType
isFileAttributeType.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_mode
member ofstruct stat
, and includes both the file type and permissions.This attribute is only available for UNIX file systems.
Corresponding
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.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
GFileAttributeType
isFileAttributeType.UINT32
.- See Also:
-
MEMORY_MONITOR_EXTENSION_POINT_NAME
Extension point for memory usage monitoring functionality. See [Extending GIO][extending-gio].- 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().
- 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.- 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).
- See Also:
-
MENU_ATTRIBUTE_LABEL
The menu item attribute which holds the label of the item.- 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()
- 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.
- 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().
- 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().
- 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][extending-gio].- See Also:
-
POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME
Extension point for power profile usage monitoring functionality. See [Extending GIO][extending-gio].- See Also:
-
PROXY_EXTENSION_POINT_NAME
Extension point for proxy functionality. See [Extending GIO][extending-gio].- See Also:
-
PROXY_RESOLVER_EXTENSION_POINT_NAME
Extension point for proxy resolving functionality. See [Extending GIO][extending-gio].- See Also:
-
SETTINGS_BACKEND_EXTENSION_POINT_NAME
Extension point forGSettingsBackend
functionality.- See Also:
-
TLS_BACKEND_EXTENSION_POINT_NAME
Extension point for TLS functionality viaGTlsBackend
. See [Extending GIO][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 forGVfs
functionality. See [Extending GIO][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
GVolume
instances into different sections - for example a file manager or file chooser can use this information to shownetwork
volumes under a "Network" heading anddevice
volumes under a "Devices" heading.- See Also:
-
VOLUME_IDENTIFIER_KIND_HAL_UDI
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][extending-gio].- See Also:
-
DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME
Extension point for default handler to URI association. See [Extending GIO][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 @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously connects to the message bus specified bybusType
.When the operation is finished,
callback
will be invoked. You can then call g_bus_get_finish() to get the result of the operation.This is an asynchronous failable function. See g_bus_get_sync() for the synchronous version.
- Parameters:
busType
- aGBusType
cancellable
- aGCancellable
ornull
callback
- aGAsyncReadyCallback
to call when the request is satisfied
-
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
GDBusConnection
object will (usually) have theGDBusConnection
:exit-on-close property set totrue
.- Parameters:
res
- aGAsyncResult
obtained from theGAsyncReadyCallback
passed to g_bus_get()- Returns:
- a
GDBusConnection
ornull
iferror
is set. Free with g_object_unref(). - Throws:
GErrorException
- seeGError
-
busGetSync
public static DBusConnection busGetSync(BusType busType, @Nullable @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
GDBusConnection
object will (usually) have theGDBusConnection
:exit-on-close property set totrue
.- Parameters:
busType
- aGBusType
cancellable
- aGCancellable
ornull
- Returns:
- a
GDBusConnection
ornull
iferror
is set. Free with g_object_unref(). - Throws:
GErrorException
- seeGError
-
busOwnNameOnConnection
public static int busOwnNameOnConnection(DBusConnection connection, String name, Set<BusNameOwnerFlags> flags, @Nullable @Nullable Closure nameAcquiredClosure, @Nullable @Nullable Closure nameLostClosure) Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.- Parameters:
connection
- aGDBusConnection
name
- the well-known name to ownflags
- a set of flags from theGBusNameOwnerFlags
enumerationnameAcquiredClosure
-GClosure
to invoke whenname
is acquired ornull
nameLostClosure
-GClosure
to invoke whenname
is lost ornull
- Returns:
- an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name.
-
busOwnNameOnConnection
public static int busOwnNameOnConnection(DBusConnection connection, String name, BusNameOwnerFlags flags, @Nullable @Nullable Closure nameAcquiredClosure, @Nullable @Nullable Closure nameLostClosure) Version of g_bus_own_name_on_connection() using closures instead of callbacks for easier binding in other languages.- Parameters:
connection
- aGDBusConnection
name
- the well-known name to ownflags
- a set of flags from theGBusNameOwnerFlags
enumerationnameAcquiredClosure
-GClosure
to invoke whenname
is acquired ornull
nameLostClosure
-GClosure
to invoke whenname
is lost ornull
- Returns:
- an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name.
-
busOwnName
public static int busOwnName(BusType busType, String name, Set<BusNameOwnerFlags> flags, @Nullable @Nullable Closure busAcquiredClosure, @Nullable @Nullable Closure nameAcquiredClosure, @Nullable @Nullable Closure nameLostClosure) Version of g_bus_own_name() using 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 from theGBusNameOwnerFlags
enumerationbusAcquiredClosure
-GClosure
to invoke when connected to the bus of typebusType
ornull
nameAcquiredClosure
-GClosure
to invoke whenname
is acquired ornull
nameLostClosure
-GClosure
to invoke whenname
is lost ornull
- Returns:
- an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name.
-
busOwnName
public static int busOwnName(BusType busType, String name, BusNameOwnerFlags flags, @Nullable @Nullable Closure busAcquiredClosure, @Nullable @Nullable Closure nameAcquiredClosure, @Nullable @Nullable Closure nameLostClosure) Version of g_bus_own_name() using 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 from theGBusNameOwnerFlags
enumerationbusAcquiredClosure
-GClosure
to invoke when connected to the bus of typebusType
ornull
nameAcquiredClosure
-GClosure
to invoke whenname
is acquired ornull
nameLostClosure
-GClosure
to invoke whenname
is lost ornull
- Returns:
- an identifier (never 0) that can be used with g_bus_unown_name() to stop owning the name.
-
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
GMainContext
after this function has returned. You should continue to iterate theGMainContext
until theGDestroyNotify
function passed to g_bus_own_name() is called, in order to avoid memory leaks through callbacks queued on theGMainContext
after it’s stopped being iterated.- Parameters:
ownerId
- an identifier obtained from g_bus_own_name()
-
busUnwatchName
public static void busUnwatchName(int watcherId) Stops watching a name.Note that there may still be D-Bus traffic to process (relating to watching and unwatching the name) in the current thread-default
GMainContext
after this function has returned. You should continue to iterate theGMainContext
until theGDestroyNotify
function passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on theGMainContext
after it’s stopped being iterated.- Parameters:
watcherId
- An identifier obtained from g_bus_watch_name()
-
busWatchNameOnConnection
public static int busWatchNameOnConnection(DBusConnection connection, String name, Set<BusNameWatcherFlags> flags, @Nullable @Nullable Closure nameAppearedClosure, @Nullable @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 theGBusNameWatcherFlags
enumeration.nameAppearedClosure
-GClosure
to invoke whenname
is known to exist ornull
.nameVanishedClosure
-GClosure
to invoke whenname
is known to not exist ornull
.- Returns:
- An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
-
busWatchNameOnConnection
public static int busWatchNameOnConnection(DBusConnection connection, String name, BusNameWatcherFlags flags, @Nullable @Nullable Closure nameAppearedClosure, @Nullable @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 theGBusNameWatcherFlags
enumeration.nameAppearedClosure
-GClosure
to invoke whenname
is known to exist ornull
.nameVanishedClosure
-GClosure
to invoke whenname
is known to not exist ornull
.- Returns:
- An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
-
busWatchName
public static int busWatchName(BusType busType, String name, Set<BusNameWatcherFlags> flags, @Nullable @Nullable Closure nameAppearedClosure, @Nullable @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 theGBusNameWatcherFlags
enumeration.nameAppearedClosure
-GClosure
to invoke whenname
is known to exist ornull
.nameVanishedClosure
-GClosure
to invoke whenname
is known to not exist ornull
.- Returns:
- An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
-
busWatchName
public static int busWatchName(BusType busType, String name, BusNameWatcherFlags flags, @Nullable @Nullable Closure nameAppearedClosure, @Nullable @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 theGBusNameWatcherFlags
enumeration.nameAppearedClosure
-GClosure
to invoke whenname
is known to exist ornull
.nameVanishedClosure
-GClosure
to invoke whenname
is known to not exist ornull
.- Returns:
- An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.
-
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:
true
if the file type corresponds to a type that can be executable,false
otherwise.
-
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
, ornull
if unknown. Free with g_free()
-
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
-
contentTypeGetMimeType
-
contentTypeGetSymbolicIcon
-
contentTypeGuess
public static String contentTypeGuess(@Nullable @Nullable String filename, @Nullable @org.jetbrains.annotations.Nullable byte[] data, @Nullable @Nullable Out<Boolean> resultUncertain) Guesses the content type based on example data. If the function is uncertain,resultUncertain
will be set totrue
. Eitherfilename
ordata
may benull
, in which case the guess will be based solely on the other argument.- Parameters:
filename
- a path, ornull
data
- a stream of data, ornull
resultUncertain
- 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()
-
contentTypeIsA
-
contentTypeIsMimeType
Determines iftype
is a subset ofmimeType
. Convenience wrapper around g_content_type_is_a().- Parameters:
type
- a content type stringmimeType
- a mime type string- Returns:
true
iftype
is a kind ofmimeType
,false
otherwise.
-
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:
true
if the type is the unknown type.
-
contentTypeSetMimeDirs
Set the list of directories used by GIO to load the MIME database. Ifdirs
isnull
, the directories used are the default:- the
mime
subdirectory of the directory in$XDG_DATA_HOME
- the
mime
subdirectory of every directory in$XDG_DATA_DIRS
This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data.
Typically, in case your tests use
G_TEST_OPTION_ISOLATE_DIRS
, but they depend on the system’s MIME database, you should call this function withdirs
set tonull
before calling g_test_init(), for instance:// Load MIME data from the system g_content_type_set_mime_dirs (NULL); // Isolate the environment g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); … return g_test_run ();
- Parameters:
dirs
-null
-terminated list of directories to load MIME data from, including anymime/
subdirectory, and with the first directory to try listed first
- the
-
contentTypesGetRegistered
-
dbusAddressEscapeValue
Escapestring
so it can appear in a D-Bus address as the value part of a key-value pair.For instance, if
string
is/run/bus-for-:0
, this function would return/run/bus-for-%3A0
, which could be used in a D-Bus address 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
string
with all non-optionally-escaped bytes escaped
-
dbusAddressGetForBusSync
public static String dbusAddressGetForBusSync(BusType busType, @Nullable @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
- aGBusType
cancellable
- aGCancellable
ornull
- Returns:
- a valid D-Bus address string for
busType
ornull
iferror
is set - Throws:
GErrorException
- seeGError
-
dbusAddressGetStream
public static void dbusAddressGetStream(String address, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously connects to an endpoint specified byaddress
and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.address
must be in the D-Bus address format.When the operation is finished,
callback
will be invoked. You can then call g_dbus_address_get_stream_finish() to get the result of the operation.This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version.
- Parameters:
address
- A valid D-Bus address.cancellable
- AGCancellable
ornull
.callback
- AGAsyncReadyCallback
to call when the request is satisfied.
-
dbusAddressGetStreamFinish
public static IOStream dbusAddressGetStreamFinish(AsyncResult res, @Nullable @Nullable Out<String> outGuid) throws GErrorException Finishes an operation started with g_dbus_address_get_stream().A server is not required to set a GUID, so
outGuid
may be set tonull
even on success.- Parameters:
res
- AGAsyncResult
obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().outGuid
-null
or return location to store the GUID extracted fromaddress
, if any.- Returns:
- A
GIOStream
ornull
iferror
is set. - Throws:
GErrorException
- seeGError
-
dbusAddressGetStreamSync
public static IOStream dbusAddressGetStreamSync(String address, @Nullable @Nullable Out<String> outGuid, @Nullable @Nullable Cancellable cancellable) throws GErrorException Synchronously connects to an endpoint specified byaddress
and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation.address
must be in the D-Bus address format.A server is not required to set a GUID, so
outGuid
may be set tonull
even on success.This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version.
- Parameters:
address
- A valid D-Bus address.outGuid
-null
or return location to store the GUID extracted fromaddress
, if any.cancellable
- AGCancellable
ornull
.- Returns:
- A
GIOStream
ornull
iferror
is set. - Throws:
GErrorException
- seeGError
-
dbusEscapeObjectPath
-
dbusEscapeObjectPathBytestring
Escapesbytes
for use in a D-Bus object path component.bytes
is an array of zero or more nonzero bytes in an unspecified encoding, followed by a single zero byte.The escaping method consists of replacing all non-alphanumeric characters (see g_ascii_isalnum()) with their hexadecimal value preceded by an underscore (
_
). For example:foo.bar.baz
will 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().
-
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().
-
dbusGvalueToGvariant
Converts aGValue
to aGVariant
of the type indicated by thetype
parameter.The conversion is using the following rules:
G_TYPE_STRING
: 's', 'o', 'g' or 'ay'G_TYPE_STRV
: 'as', 'ao' or 'aay'G_TYPE_BOOLEAN
: 'b'G_TYPE_UCHAR
: 'y'G_TYPE_INT
: 'i', 'n'G_TYPE_UINT
: 'u', 'q'G_TYPE_INT64
: 'x'G_TYPE_UINT64
: 't'G_TYPE_DOUBLE
: 'd'G_TYPE_VARIANT
: AnyGVariantType
This can fail if e.g.
gvalue
is of typeG_TYPE_STRING
andtype
is 'i', i.e.G_VARIANT_TYPE_INT32
. It will also fail for anyGType
(including e.g.G_TYPE_OBJECT
andG_TYPE_BOXED
derived-types) not in the table above.Note that if
gvalue
is of typeG_TYPE_VARIANT
and its value isnull
, the emptyGVariant
instance (nevernull
) fortype
is returned (e.g. 0 for scalar types, the empty string for string types, '/' for object path types, the empty array for any array type and so on).See the g_dbus_gvariant_to_gvalue() function for how to convert a
GVariant
to aGValue
.- Parameters:
gvalue
- AGValue
to convert to aGVariant
type
- AGVariantType
- Returns:
- A
GVariant
(never floating) ofGVariantType
type
holding the data fromgvalue
or an emptyGVariant
in case of failure. Free with g_variant_unref().
-
dbusGvariantToGvalue
Converts aGVariant
to aGValue
. Ifvalue
is floating, it is consumed.The rules specified in the g_dbus_gvalue_to_gvariant() function are used - this function is essentially its reverse form. So, a
GVariant
containing any basic or string array type will be converted to aGValue
containing a basic value or string array. Any otherGVariant
(handle, variant, tuple, dict entry) will be converted to aGValue
containing thatGVariant
.The conversion never fails - a valid
GValue
is always returned inoutGvalue
.- Parameters:
value
- AGVariant
.outGvalue
- Return location pointing to a zero-filled (uninitialized)GValue
.
-
dbusIsAddress
Checks ifstring
is a D-Bus address.This doesn't check if
string
is actually supported byGDBusServer
orGDBusConnection
- use g_dbus_is_supported_address() to do more checks.- Parameters:
string
- A string.- Returns:
true
ifstring
is a valid D-Bus address,false
otherwise.
-
dbusIsErrorName
Check whetherstring
is a valid D-Bus error name.This function returns the same result as g_dbus_is_interface_name(), because D-Bus error names are defined to have exactly the same syntax as interface names.
- Parameters:
string
- The string to check.- Returns:
true
if valid,false
otherwise.
-
dbusIsGuid
Checks ifstring
is a D-Bus GUID.See the documentation for g_dbus_generate_guid() for more information about the format of a GUID.
- Parameters:
string
- The string to check.- Returns:
true
ifstring
is a GUID,false
otherwise.
-
dbusIsInterfaceName
Checks ifstring
is a valid D-Bus interface name.- Parameters:
string
- The string to check.- Returns:
true
if valid,false
otherwise.
-
dbusIsMemberName
Checks ifstring
is a valid D-Bus member (e.g. signal or method) name.- Parameters:
string
- The string to check.- Returns:
true
if valid,false
otherwise.
-
dbusIsName
Checks ifstring
is a valid D-Bus bus name (either unique or well-known).- Parameters:
string
- The string to check.- Returns:
true
if valid,false
otherwise.
-
dbusIsSupportedAddress
Like g_dbus_is_address() but also checks if the library supports the transports instring
and that key/value pairs for each transport are valid. See the specification of the D-Bus address format.- Parameters:
string
- A string.- Returns:
true
ifstring
is a valid D-Bus address that is supported by this library,false
iferror
is set.- Throws:
GErrorException
- seeGError
-
dbusIsUniqueName
Checks ifstring
is a valid D-Bus unique bus name.- Parameters:
string
- The string to check.- Returns:
true
if valid,false
otherwise.
-
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
_63
is not valid, the string should containc
instead).- Parameters:
s
- the string to unescape- Returns:
- an
unescaped version of
s
, ornull
ifs
is not a string returned from g_dbus_escape_object_path(). Free with g_free().
-
ioErrorFromErrno
Convertserrno.h
error codes into GIO error codes.The fallback value
IOErrorEnum.FAILED
is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).As
errno
is global and may be modified by intermediate function calls, you should save its value immediately after the call returns, and use the saved value instead 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:
GIOErrorEnum
value for the givenerrno.h
error number
-
ioErrorFromFileError
ConvertsGFileError
error codes into GIO error codes.- Parameters:
fileError
- aGFileError
.- Returns:
GIOErrorEnum
value for the givenGFileError
error value.
-
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
GIOModules
loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free().
-
ioModulesLoadAllInDirectoryWithScope
public static List<IOModule> ioModulesLoadAllInDirectoryWithScope(String dirname, IOModuleScope scope) Loads all the modules in the specified directory.If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.
- Parameters:
dirname
- pathname for a directory containing modules to load.scope
- a scope to use when scanning the modules.- Returns:
- a list of
GIOModules
loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free().
-
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.
-
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
-
ioSchedulerCancelAllJobs
Deprecated.You should never call this function, since you don't know how other libraries in your program might be making use of gioscheduler.Cancels all cancellable I/O jobs.A job is cancellable if a
GCancellable
was passed into g_io_scheduler_push_job(). -
ioSchedulerPushJob
@Deprecated public static void ioSchedulerPushJob(IOSchedulerJobFunc jobFunc, int ioPriority, @Nullable @Nullable Cancellable cancellable) Deprecated.useGThreadPool
or g_task_run_in_thread()Schedules the I/O job to run in another thread.notify
will be called onuserData
afterjobFunc
has returned, regardless whether the job was cancelled or has run to completion.If
cancellable
is 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
- optionalGCancellable
object,null
to ignore.
-
keyfileSettingsBackendNew
public static SettingsBackend keyfileSettingsBackendNew(String filename, String rootPath, @Nullable @Nullable String rootGroup) Creates a keyfile-backedGSettingsBackend
.The filename of the keyfile to use is given by
filename
.All settings read to or written from the backend must fall under the path given in
rootPath
(which must start and end with a slash and not contain two consecutive slashes).rootPath
may be "/".If
rootGroup
is non-null
then it specifies the name of the keyfile group used for keys that are written directly belowrootPath
. For example, ifrootPath
is "/apps/example/" androotGroup
is "toplevel", then settings the key "/apps/example/enabled" to a value oftrue
will cause the following to appear in the keyfile:[toplevel] enabled=true
If
rootGroup
isnull
then 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 to 12 then the following would appear in the keyfile:[profiles/default] font-size=12
The backend will refuse writes (and return writability as being
false
) for keys outside ofrootPath
and, in the event thatrootGroup
isnull
, 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
defaults
in the directory specified by theGKeyfileSettingsBackend
:defaults-dir property, and a list of locked keys from a text file with the namelocks
in the same location.- Parameters:
filename
- the filename of the keyfilerootPath
- the path under which all settings keys appearrootGroup
- the group name corresponding torootPath
, ornull
- Returns:
- a keyfile-backed
GSettingsBackend
-
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
-
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). -
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
-
pollableSourceNew
Utility method forGPollableInputStream
andGPollableOutputStream
implementations. Creates a newGSource
that 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
.
-
pollableSourceNewFull
public static Source pollableSourceNewFull(GObject pollableStream, @Nullable @Nullable Source childSource, @Nullable @Nullable Cancellable cancellable) Utility method forGPollableInputStream
andGPollableOutputStream
implementations. 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
- optionalGCancellable
to attach- Returns:
- the new
GSource
.
-
pollableStreamRead
public static long pollableStreamRead(InputStream stream, byte[] buffer, boolean blocking, @Nullable @Nullable Cancellable cancellable) throws GErrorException Tries to read fromstream
, as with g_input_stream_read() (ifblocking
istrue
) or g_pollable_input_stream_read_nonblocking() (ifblocking
isfalse
). This can be used to more easily share code between blocking and non-blocking implementations of a method.If
blocking
isfalse
, thenstream
must be aGPollableInputStream
for which g_pollable_input_stream_can_poll() returnstrue
, or else the behavior is undefined. Ifblocking
istrue
, thenstream
does not need to be aGPollableInputStream
.- Parameters:
stream
- aGInputStream
buffer
- a buffer to read data intoblocking
- whether to do blocking I/Ocancellable
- optionalGCancellable
object,null
to ignore.- Returns:
- the number of bytes read, or -1 on error.
- Throws:
GErrorException
- seeGError
-
pollableStreamWrite
public static long pollableStreamWrite(OutputStream stream, byte[] buffer, boolean blocking, @Nullable @Nullable Cancellable cancellable) throws GErrorException Tries to write tostream
, as with g_output_stream_write() (ifblocking
istrue
) or g_pollable_output_stream_write_nonblocking() (ifblocking
isfalse
). This can be used to more easily share code between blocking and non-blocking implementations of a method.If
blocking
isfalse
, thenstream
must be aGPollableOutputStream
for which g_pollable_output_stream_can_poll() returnstrue
or else the behavior is undefined. Ifblocking
istrue
, thenstream
does not need to be aGPollableOutputStream
.- Parameters:
stream
- aGOutputStream
.buffer
- the buffer containing the data to write.blocking
- whether to do blocking I/Ocancellable
- optionalGCancellable
object,null
to ignore.- Returns:
- the number of bytes written, or -1 on error.
- Throws:
GErrorException
- seeGError
-
pollableStreamWriteAll
public static boolean pollableStreamWriteAll(OutputStream stream, byte[] buffer, boolean blocking, Out<Long> bytesWritten, @Nullable @Nullable Cancellable cancellable) throws GErrorException Tries to writecount
bytes 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
count
bytes,true
is returned, andbytesWritten
is set tocount
.If there is an error during the operation (including
IOErrorEnum.WOULD_BLOCK
in the non-blocking case),false
is returned anderror
is set to indicate the error status,bytesWritten
is updated to contain the number of bytes written into the stream before the error occurred.As with g_pollable_stream_write(), if
blocking
isfalse
, thenstream
must be aGPollableOutputStream
for which g_pollable_output_stream_can_poll() returnstrue
or else the behavior is undefined. Ifblocking
istrue
, thenstream
does 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
- optionalGCancellable
object,null
to ignore.- Returns:
true
on success,false
if there was an error- Throws:
GErrorException
- seeGError
-
resourcesEnumerateChildren
public static String[] resourcesEnumerateChildren(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Returns all the names of children at the specifiedpath
in the set of globally registered resources. The return result is anull
terminated list of strings which should be released with g_strfreev().lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
- an array of constant strings
- Throws:
GErrorException
- seeGError
-
resourcesEnumerateChildren
public static String[] resourcesEnumerateChildren(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Returns all the names of children at the specifiedpath
in the set of globally registered resources. The return result is anull
terminated list of strings which should be released with g_strfreev().lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
- an array of constant strings
- Throws:
GErrorException
- seeGError
-
resourcesGetInfo
public static boolean resourcesGetInfo(String path, Set<ResourceLookupFlags> lookupFlags, @Nullable @Nullable Out<Long> size, @Nullable @Nullable Out<Integer> flags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and if found returns information about it.lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
size
- a location to place the length of the contents of the file, ornull
if the length is not neededflags
- a location to place theGResourceFlags
about the file, ornull
if the flags are not needed- Returns:
true
if the file was found.false
if there were errors- Throws:
GErrorException
- seeGError
-
resourcesGetInfo
public static boolean resourcesGetInfo(String path, ResourceLookupFlags lookupFlags, @Nullable @Nullable Out<Long> size, @Nullable @Nullable Out<Integer> flags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and if found returns information about it.lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
size
- a location to place the length of the contents of the file, ornull
if the length is not neededflags
- a location to place theGResourceFlags
about the file, ornull
if the flags are not needed- Returns:
true
if the file was found.false
if there were errors- Throws:
GErrorException
- seeGError
-
resourcesLookupData
public static Bytes resourcesLookupData(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGBytes
that lets you directly access the data in memory.The data is always followed by a zero byte, so you can safely use the data as a C string. However, that byte is not included in the size of the GBytes.
For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some readonly data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.
lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
GBytes
ornull
on error. Free the returned object with g_bytes_unref()- Throws:
GErrorException
- seeGError
-
resourcesLookupData
public static Bytes resourcesLookupData(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGBytes
that lets you directly access the data in memory.The data is always followed by a zero byte, so you can safely use the data as a C string. However, that byte is not included in the size of the GBytes.
For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some readonly data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data.
lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
GBytes
ornull
on error. Free the returned object with g_bytes_unref()- Throws:
GErrorException
- seeGError
-
resourcesOpenStream
public static InputStream resourcesOpenStream(String path, Set<ResourceLookupFlags> lookupFlags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGInputStream
that lets you read the data.lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
GInputStream
ornull
on error. Free the returned object with g_object_unref()- Throws:
GErrorException
- seeGError
-
resourcesOpenStream
public static InputStream resourcesOpenStream(String path, ResourceLookupFlags... lookupFlags) throws GErrorException Looks for a file at the specifiedpath
in the set of globally registered resources and returns aGInputStream
that lets you read the data.lookupFlags
controls the behaviour of the lookup.- Parameters:
path
- A pathname inside the resourcelookupFlags
- AGResourceLookupFlags
- Returns:
GInputStream
ornull
on error. Free the returned object with g_object_unref()- Throws:
GErrorException
- seeGError
-
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 g_resources_lookup_data().- Parameters:
resource
- AGResource
-
resourcesUnregister
Unregisters the resource from the process-global set of resources.- Parameters:
resource
- AGResource
-
simpleAsyncReportErrorInIdle
@Deprecated public static void simpleAsyncReportErrorInIdle(@Nullable @Nullable GObject object, @Nullable @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 theGAsyncResult
with the given error information.- Parameters:
object
- aGObject
, ornull
.callback
- aGAsyncReadyCallback
.domain
- aGQuark
containing 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 @Nullable GObject object, @Nullable @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 aGError
rather than building a new one.- Parameters:
object
- aGObject
, ornull
callback
- aGAsyncReadyCallback
.error
- theGError
to report
-
simpleAsyncReportTakeGerrorInIdle
@Deprecated public static void simpleAsyncReportTakeGerrorInIdle(@Nullable @Nullable GObject object, @Nullable @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
, ornull
callback
- aGAsyncReadyCallback
.error
- theGError
to report
-
unixIsMountPathSystemInternal
Determines ifmountPath
is considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user.- Parameters:
mountPath
- a mount path, e.g./media/disk
or/usr
- Returns:
true
ifmountPath
is considered an implementation detail of the OS.
-
unixIsSystemDevicePath
Determines ifdevicePath
is considered a block device path which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux/proc
filesystem.The list of device paths considered ‘system’ ones may change over time.
- Parameters:
devicePath
- a device path, e.g./dev/loop0
ornfsd
- Returns:
true
ifdevicePath
is considered an implementation detail of the OS.
-
unixIsSystemFsType
Determines iffsType
is considered a type of file system which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux/proc
filesystem.The list of file system types considered ‘system’ ones may change over time.
- Parameters:
fsType
- a file system type, e.g.procfs
ortmpfs
- Returns:
true
iffsType
is considered an implementation detail of the OS.
-
unixMountAt
Gets aGUnixMountEntry
for a given mount path. IftimeRead
is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mounts_changed_since().If more mounts have the same mount path, the last matching mount is returned.
This will return
null
if there is no mount point atmountPath
.- Parameters:
mountPath
- path for a possible unix mount.timeRead
- guint64 to contain a timestamp.- Returns:
- a
GUnixMountEntry
.
-
unixMountCompare
Compares two unix mounts.- Parameters:
mount1
- firstGUnixMountEntry
to compare.mount2
- secondGUnixMountEntry
to compare.- Returns:
- 1, 0 or -1 if
mount1
is greater than, equal to, or less thanmount2
, respectively.
-
unixMountCopy
Makes a copy ofmountEntry
.- Parameters:
mountEntry
- aGUnixMountEntry
.- Returns:
- a new
GUnixMountEntry
-
unixMountFor
Gets aGUnixMountEntry
for a given file path. IftimeRead
is set, it will be filled with a unix timestamp for checking if the mounts have changed since with g_unix_mounts_changed_since().If more mounts have the same mount path, the last matching mount is returned.
This will return
null
if looking up the mount entry fails, iffilePath
doesn’t exist or there is an I/O error.- Parameters:
filePath
- file path on some unix mount.timeRead
- guint64 to contain a timestamp.- Returns:
- a
GUnixMountEntry
.
-
unixMountFree
Frees a unix mount.- Parameters:
mountEntry
- aGUnixMountEntry
.
-
unixMountGetDevicePath
Gets the device path for a unix mount.- Parameters:
mountEntry
- aGUnixMount
.- Returns:
- a string containing the device path.
-
unixMountGetFsType
Gets the filesystem type for the unix mount.- Parameters:
mountEntry
- aGUnixMount
.- Returns:
- a string containing the file system type.
-
unixMountGetMountPath
Gets the mount path for a unix mount.- Parameters:
mountEntry
- inputGUnixMountEntry
to get the mount path for.- Returns:
- the mount path for
mountEntry
.
-
unixMountGetOptions
Gets a comma-separated list of mount options for the unix mount. For example,rw,relatime,seclabel,data=ordered
.This is similar to g_unix_mount_point_get_options(), but it takes a
GUnixMountEntry
as an argument.- Parameters:
mountEntry
- aGUnixMountEntry
.- Returns:
- a string containing the options, or
null
if not available.
-
unixMountGetRootPath
Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar".
- Parameters:
mountEntry
- aGUnixMountEntry
.- Returns:
- a string containing the root, or
null
if not supported.
-
unixMountGuessCanEject
Guesses whether a Unix mount can be ejected.- Parameters:
mountEntry
- aGUnixMountEntry
- Returns:
true
ifmountEntry
is deemed to be ejectable.
-
unixMountGuessIcon
Guesses the icon of a Unix mount.- Parameters:
mountEntry
- aGUnixMountEntry
- Returns:
- a
GIcon
-
unixMountGuessName
Guesses the name of a Unix mount. The result is a translated string.- Parameters:
mountEntry
- aGUnixMountEntry
- Returns:
- A newly allocated string that must be freed with g_free()
-
unixMountGuessShouldDisplay
Guesses whether a Unix mount should be displayed in the UI.- Parameters:
mountEntry
- aGUnixMountEntry
- Returns:
true
ifmountEntry
is deemed to be displayable.
-
unixMountGuessSymbolicIcon
Guesses the symbolic icon of a Unix mount.- Parameters:
mountEntry
- aGUnixMountEntry
- Returns:
- a
GIcon
-
unixMountIsReadonly
Checks if a unix mount is mounted read only.- Parameters:
mountEntry
- aGUnixMount
.- Returns:
true
ifmountEntry
is read only.
-
unixMountIsSystemInternal
Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() onmountEntry
’s properties.The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored.
- Parameters:
mountEntry
- aGUnixMount
.- Returns:
true
if the unix mount is for a system path.
-
unixMountPointsChangedSince
public static boolean unixMountPointsChangedSince(long time) Checks if the unix mount points have changed since a given unix time.- Parameters:
time
- guint64 to contain a timestamp.- Returns:
true
if the mount points have changed sincetime
.
-
unixMountPointsGet
Gets aGList
ofGUnixMountPoint
containing the unix mount points. IftimeRead
is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_points_changed_since().- Parameters:
timeRead
- guint64 to contain a timestamp.- Returns:
- a
GList
of the UNIX mountpoints.
-
unixMountPointsGetFromFile
public static UnixMountPoint[] unixMountPointsGetFromFile(String tablePath, @Nullable @Nullable Out<Long> timeReadOut) Gets an array ofGio.UnixMountPoint
s containing the Unix mount points listed intablePath
.This is a generalized version of g_unix_mount_points_get(), mainly intended for internal testing use. Note that g_unix_mount_points_get() may parse multiple hierarchical table files, so this function is not a direct superset of its functionality.
If there is an error reading or parsing the file,
NULL
will be returned and both out parameters will be set to0
.- Parameters:
tablePath
- path to the mount points table file (for example/etc/fstab
)timeReadOut
- return location for the modification time oftablePath
- Returns:
- mount
points, or
NULL
if there was an error loading them
-
unixMountsChangedSince
public static boolean unixMountsChangedSince(long time) Checks if the unix mounts have changed since a given unix time.- Parameters:
time
- guint64 to contain a timestamp.- Returns:
true
if the mounts have changed sincetime
.
-
unixMountsGet
Gets aGList
ofGUnixMountEntry
containing the unix mounts. IftimeRead
is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mounts_changed_since().- Parameters:
timeRead
- guint64 to contain a timestamp, ornull
- Returns:
- a
GList
of the UNIX mounts.
-
unixMountsGetFromFile
public static UnixMountEntry[] unixMountsGetFromFile(String tablePath, @Nullable @Nullable Out<Long> timeReadOut) Gets an array ofGio.UnixMountEntry
s containing the Unix mounts listed intablePath
.This is a generalized version of g_unix_mounts_get(), mainly intended for internal testing use. Note that g_unix_mounts_get() may parse multiple hierarchical table files, so this function is not a direct superset of its functionality.
If there is an error reading or parsing the file,
NULL
will be returned and both out parameters will be set to0
.- Parameters:
tablePath
- path to the mounts table file (for example/proc/self/mountinfo
)timeReadOut
- return location for the modification time oftablePath
- Returns:
- mount
entries, or
NULL
if there was an error loading them
-
ioErrorFromWin32Error
Converts some common error codes (as returned from GetLastError() or WSAGetLastError()) into GIO error codes. The fallback valueIOErrorEnum.FAILED
is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead).You can use g_win32_error_message() to get a localized string corresponding to
errorCode
. (But note that unlike g_strerror(), g_win32_error_message() returns a string that must be freed.)- Parameters:
errorCode
- Windows error number.- Returns:
GIOErrorEnum
value for the given error number.
-
registrySettingsBackendNew
IfregistryKey
isnull
then the default pathHKEY_CURRENT_USER\\Software\\GSettings
is used.- Parameters:
registryKey
- the path to the registry key where settings are stored, ornull
.- Returns:
- a registry-backed
GSettingsBackend
-