SYNOPSIS
#include <unistd.h>
int chdir(const char *pathname);
DESCRIPTION
The
PARAMETERS
RETURN VALUES
If successful,
- EACCES
-
Search permission is denied for a component of the path name.
- EFAULT
-
pathname points outside the allocated address space of the process.
- EINTR
-
A signal interrupted the call.
- EIO
-
An I/O error occurred while reading from or writing to the file system.
- ENAMETOOLONG
-
The pathname parameter exceeds PATH_MAX in length or a pathname component is longer than NAME_MAX while _POSIX_NO_TRUNC is in effect.
- ENOENT
-
The named directory does not exist or pathname is an empty string.
- ENOTDIR
-
A component of the pathname is not a directory.
CONFORMANCE
POSIX.1 (1996), with exceptions.
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
Windows supports multiple root directories, one for each drive, and
also maintains a current working directory on each drive.
The
File names are treated as multibyte sequences and are converted to Unicode (UTF-16)
before passing to Win32. The conversion is either performed based on the
current thread locale, set using
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.