registerUriScheme

open fun registerUriScheme(scheme: String, uriFunc: VfsFileLookupFunc?, parseNameFunc: VfsFileLookupFunc?): Boolean(source)

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 @scheme 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()), @uri_func 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,

Return

true if @scheme was successfully registered, or false if a handler for @scheme already exists.

Since

2.50

Parameters

scheme

an URI scheme, e.g. "http"

uriFunc

a #GVfsFileLookupFunc

parseNameFunc

a #GVfsFileLookupFunc