## ide-path ide-path |

## Functions

gchar * | ide_path_collapse ()
gchar * | ide_path_expand ()
gboolean | ide_path_is_c_like ()
gboolean | ide_path_is_cpp_like ()
gchar * | ide_find_program_in_host_path ()

## 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

### ide_path_is_c_like ()

    gboolean
    ide_path_is_c_like (const gchar *path);

### ide_path_is_cpp_like ()

    gboolean
    ide_path_is_cpp_like (const gchar *path);

### ide_find_program_in_host_path ()

    gchar *
    ide_find_program_in_host_path (const gchar *program);

Like `g_find_program_in_path()` but checks the host system which may not be the same as the container we're running within.

#### Parameters

program | the name of the executable |

#### Returns

a path or `NULL`.

[transfer full][nullable]

Since: 3.34