% chdir(3) Version 1.0 | Library Functions Manual


NAME

chdir — change working directory

LIBRARY

libmega C library (-lmega)

SYNOPSIS

#include <unistd.h>

int chdir(const char *path);

DESCRIPTION

changes the current working directory of the calling process to the directory specified in path.

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

ERRORS

chdir() can fail with the following errors:

  • ENOENT - The directory specified in path does not exist.
  • ENOTDIR - A component of path is not a directory.

NOTES

The current working directory is the starting point for interpreting relative pathnames (those not starting with '/').

BUGS

See GitHub Issues: https://github.com/znac049/mega-micros-sbc3/issues

AUTHOR

Bob Green bob@chippers.org.uk

SEE ALSO

getcwd()

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9