Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>chdir</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
chdir
=====

Syntax
------

     #include <unistd.h>
     
     int chdir(const char *new_directory);

Description
-----------

This function changes the current directory to NEW_DIRECTORY.  If a
drive letter is specified, the current directory for that drive is
changed and the current disk is set to that drive, else the current
directory for the current drive is changed.

Return Value
------------

Zero if the new directory exists, else nonzero and ERRNO set if error.

Example
-------

     if (chdir("/tmp"))
       perror("/tmp");


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson