pop

fun pop(): Boolean

Removes the last element of the path buffer.

If there is only one element in the path buffer (for example, / on Unix-like operating systems or the drive on Windows systems), it will not be removed and false will be returned instead.

|[ GPathBuf buf, cmp;

g_path_buf_init_from_path (&buf, "/bin/sh");

g_path_buf_pop (&buf); g_path_buf_init_from_path (&cmp, "/bin"); g_assert_true (g_path_buf_equal (&buf, &cmp)); g_path_buf_clear (&cmp);

g_path_buf_pop (&buf); g_path_buf_init_from_path (&cmp, "/"); g_assert_true (g_path_buf_equal (&buf, &cmp)); g_path_buf_clear (&cmp);

g_path_buf_clear (&buf); ]|

Return

TRUE if the buffer was modified and FALSE otherwise

Since

2.76