URI.filenameToUri

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

struct URI
static
string
filenameToUri
(
string filename
,
string hostname
)

Parameters

filename string

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 string

A UTF-8 encoded hostname, or %NULL for none.

Return Value

Type: string

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

Throws

GException on failure.

Meta