Class: Gio::Vfs
- Inherits:
-
Object
- Object
- Gio::Vfs
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#get_file_for_path(path) ⇒ Gio::File
Gets a #GFile for path.
-
#get_file_for_uri(uri) ⇒ Gio::File
Gets a #GFile for uri.
-
#is_active ⇒ TrueClass
Checks if the VFS is active.
-
#parse_name(parse_name) ⇒ Gio::File
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.
-
#register_uri_scheme(scheme, uri_func, uri_data, uri_destroy, parse_name_func, parse_name_data, parse_name_destroy) ⇒ TrueClass
Registers uri_func and parse_name_func as the #GFile URI and parse name lookup functions for URIs with a scheme matching scheme.
-
#supported_uri_schemes ⇒ Array<String>
Gets a list of URI schemes supported by vfs.
-
#unregister_uri_scheme(scheme) ⇒ TrueClass
Unregisters the URI handler for scheme previously registered with g_vfs_register_uri_scheme().
Instance Method Details
#get_file_for_path(path) ⇒ Gio::File
Gets a #GFile for path.
#get_file_for_uri(uri) ⇒ Gio::File
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.
#is_active ⇒ TrueClass
Checks if the VFS is active.
#parse_name(parse_name) ⇒ Gio::File
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.
#register_uri_scheme(scheme, uri_func, uri_data, uri_destroy, parse_name_func, parse_name_data, parse_name_destroy) ⇒ TrueClass
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, parse_name_func 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 of parse_name_func should 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().
#supported_uri_schemes ⇒ Array<String>
Gets a list of URI schemes supported by vfs.
#unregister_uri_scheme(scheme) ⇒ TrueClass
Unregisters the URI handler for scheme previously registered with g_vfs_register_uri_scheme().