RTEMS Logo

RTEMS 4.9.3 On-Line Library


Files and Directories Manager fchdir - Changes the current working directory

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.8: fchdir - Changes the current working directory

CALLING SEQUENCE:

#include <unistd.h>

int fchdir(
  int fd
);

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 fchdir() function causes the directory named by fd to become the current working directory; that is, the starting point for searches of pathnames not beginning with a slash.

If fchdir() 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