Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: object
Entry point for using GIO functionality.
GVfs (Handle = null)
Creates a new
Vfsby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
GObject.
A GObject object.get_file_for_path (string path)
Gets a #GFile for @path.
path is a string containing a VFS path..a #GFile. Free the returned object with g_object_unref()..get_file_for_uri (string uri)
Gets a #GFile for @uri. This operation never fails, but the returned object might not support any I/O operation if the URI is malformed or if the URI scheme is not supported.
uri is a string containing a URI.a #GFile. Free the returned object with g_object_unref()..get_supported_uri_schemes ()
Gets a list of URI schemes supported by @vfs.
a %NULL-terminated array of strings. The returned array belongs to GIO and must not be freed or modified..is_active ()
Checks if the VFS is active.
%TRUE if construction of the @vfs was successful and it is now active..parse_name (string parse_name)
This operation never fails, but the returned object might not support any I/O operations if the @parse_name cannot be parsed by the #GVfs module.
parse_name is a string to be parsed by the VFS module..a #GFile for the given @parse_name. Free the returned object with g_object_unref()..register_uri_scheme (string scheme, object uri_destroy, object parse_name_destroy)
Registers @uri_func and @parse_name_func as the #GFile URI and parse name lookup functions for URIs with a scheme matching @scheme. Note that
is registered only within the running application, as opposed to desktop-wide as it happens with GVfs backends. When a #GFile is requested with an URI containing @scheme (e.g. through g_file_new_for_uri()),will be called to allow a custom constructor. The implementation of @uri_func should not be blocking, and must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). When g_file_parse_name() is called with a parse name obtained from such file,will be called to allow the #GFile to be created again. In that case, it's responsibility of @parse_name_func to make sure the parse name matches what the custom #GFile implementation returned when g_file_get_parse_name() was previously called. The implementation ofshould not be blocking, and must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). It's an error to call this function twice with the same scheme. To unregister a custom URI scheme, use g_vfs_unregister_uri_scheme().scheme is an URI scheme, e.g. "http".uri_func is a #GVfsFileLookupFunc.uri_data is custom data passed to be passed to @uri_func, or %NULL.uri_destroy is function to be called when unregistering the URI scheme, or when @vfs is disposed, to free the resources used by the URI lookup function.parse_name_func is a #GVfsFileLookupFunc.parse_name_data is custom data passed to be passed toor %NULL.parse_name_destroy is function to be called when unregistering the URI scheme, or when @vfs is disposed, to free the resources used by the parse name lookup function.%TRUE if @scheme was successfully registered, or %FALSE if a handler for @scheme already exists..unregister_uri_scheme (string scheme)
Unregisters the URI handler for @scheme previously registered with g_vfs_register_uri_scheme().
scheme is an URI scheme, e.g. "http".%TRUE if @scheme was successfully unregistered, or %FALSE if a handler for @scheme does not exist..
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.