PathBuf.push
glib.path_buf.PathBuf push(string path)Extends the given path buffer with path.
If path is absolute, it replaces the current path.
If path contains a directory separator, the buffer is extended by as many elements the path provides.
On Windows, both forward slashes and backslashes are treated as directory separators. On other platforms, [glib.types.DIR_SEPARATOR_S] is the only directory separator.
GPathBuf buf, cmp;
g_path_buf_init_from_path (&buf, "/tmp");
g_path_buf_push (&buf, ".X11-unix/X0");
g_path_buf_init_from_path (&cmp, "/tmp/.X11-unix/X0");
g_assert_true (g_path_buf_equal (&buf, &cmp));
g_path_buf_clear (&cmp);
g_path_buf_push (&buf, "/etc/locale.conf");
g_path_buf_init_from_path (&cmp, "/etc/locale.conf");
g_assert_true (g_path_buf_equal (&buf, &cmp));
g_path_buf_clear (&cmp);
g_path_buf_clear (&buf);Parameters
path | a path |
Returns
the same pointer to buf, for convenience