skip_root
Description:
Returns a pointer into file_name
after the root component, i.
e. after the "/" in UNIX or "C:\" under Windows. If file_name
is not an absolute path it returns null
.
Example: Skip the root component:
public static int main (string[] args) {
// Output: ``my/absolute/path.txt``
string res = Path.skip_root ("/my/absolute/path.txt");
print ("%s\n", res);
// Output: ``(null)``
res = Path.skip_root ("../my/absolute/path.txt");
print ("%s\n", res);
// Output: ``(null)``
res = Path.skip_root ("./my/absolute/path.txt");
print ("%s\n", res);
return 0;
}
valac --pkg glib-2.0 GLib.Path.skip_root.vala
Parameters:
file_name |
a file name |
Returns:
a pointer into |
Namespace: GLib.Path
Package: glib-2.0