---
name: "gfs_chdir"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfs_chdir"
---

# gfs\_chdir(3)

change working directory

## NAME

gfs\_chdir - change working directory

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \*gfs\_chdir (const char \*** *gfarm\_url***);**

## DESCRIPTION

**gfs\_chdir()** changes the current working directory to that specified by *gfarm\_url*.

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **GFARM\_ERR\_NO\_MEMORY**

  Insufficient memory was available.

- **GFARM\_ERR\_AUTHENTICATION**

  User authentication failed when connecting to [gfmd(8)](/gfmd/8.md).

- **GFARM\_ERR\_PERMISSION\_DENIED**

  *gfarm\_url* points outside your accessible address space.

- **GFARM\_ERR\_NO\_SUCH\_OBJECT**

  Directory does not exist.

- **GFARM\_ERR\_NOT\_A\_DIRECTORY**

  A component of the path prefix is not a directory.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.
