Gets the local pathname for File, if one exists.
If non-null, this is guaranteed to be an absolute, canonical path. It might contain symlinks.
This call does no blocking I/O.
Example: Get the path:
public static int main (string[] args) {
// Output: ``/home/flo/examples/my/dir/my-test.txt``
File file = File.new_for_path ("../my/dir/my-test.txt");
string parse_name = file.get_path ();
print ("%s\n", parse_name);
return 0;
}
valac --pkg gio-2.0 GLib.File.get_path.vala
this |
input File |
string containing the File's path, or null if no such path exists. The returned string should be freed with g_free when no longer needed. |