Example: Get the URI scheme

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

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

See:




2022 vala-language.org