to_uri


Description:

public string to_uri (string filename, string? hostname = null) throws ConvertError

Converts an absolute filename to an escaped ASCII-encoded URI, with the path component following Section 3.3.

of RFC 2396.

Parameters:

filename

an absolute filename specified in the GLib file name encoding, which is the on-disk file name bytes on Unix, and UTF-8 on Windows

hostname

A UTF-8 encoded hostname, or null for none.

Returns:

a newly-allocated string holding the resulting URI, or null on an error.


Namespace: GLib.Filename
Package: glib-2.0