Function

GLibchdir

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 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 string is a file system path, using the OS encoding.

Return value

Returns: int
 

0 on success, -1 if an error occurred.