Function

GLibchdir

since: 2.8

Declaration

int
g_chdir (
  const gchar* path
)

Description

A wrapper for the POSIX chdir() function. The function changes the current directory of the process to path.

See your C library manual for more details about chdir().

Available since: 2.8

Parameters

path

Type: const gchar*

A pathname in the GLib file name encoding (UTF-8 on Windows)

The data is owned by the caller of the function.
The value is a file system path, using the OS encoding.

Return value

Type: int

0 on success, -1 if an error occurred.