get_uri


Description:

public abstract string get_uri ()

Gets the URI for the this.

This call does no blocking I/O.

Example: Get the URI:

public static int main (string[] args) {
// Output: ``file:///home/flo/examples/my/dir/my-test.txt``
File file = File.new_for_path ("../my/dir/my-test.txt");
string parse_name = file.get_uri ();
print ("%s\n", parse_name);
return 0;
}

valac --pkg gio-2.0 GLib.File.get_uri.vala

Parameters:

this

input File

Returns:

a string containing the File's URI. The returned string should be freed with g_free when no longer needed.