ide-path

ide-path

Functions

Description

Functions

ide_path_collapse ()

gchar *
ide_path_collapse (const gchar *path);

This function will collapse a path that starts with the users home directory into a shorthand notation using ~/ for the home directory.

If the path does not have the home directory as a prefix, it will simply return a copy of path .

Returns

A new path, possibly collapsed.

[transfer full]

Since: 3.32


ide_path_expand ()

gchar *
ide_path_expand (const gchar *path);

This function will expand various "shell-like" features of the provided path using the POSIX wordexp(3) function. Command substitution will not be enabled, but path features such as ~user will be expanded.

Returns

A newly allocated string containing the expansion. A copy of the input string upon failure to expand.

[transfer full]

Since: 3.32

Types and Values