RTEMS Logo

RTEMS 4.10.2 On-Line Library


Files and Directories Manager chdir - Changes the current working directory

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.7: chdir - Changes the current working directory

CALLING SEQUENCE:

#include <unistd.h>

int chdir(
  const char *path
);

STATUS CODES:

On error, this routine returns -1 and sets errno to one of the following:

EACCES
Search permission is denied for a directory in a file's path prefix.
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in effect.
ENOENT
A file or directory does not exist.
ENOTDIR
A component of the specified pathname was not a directory when directory was expected.

DESCRIPTION:

The chdir() function causes the directory named by path to become the current working directory; that is, the starting point for searches of pathnames not beginning with a slash.

If chdir() detects an error, the current working directory is not changed.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2008 OAR Corporation