Concept Framework 2.2 documentation Contents | Index

standard.C.io._chdir

Name Version Deprecated
_chdir version 1.0 no

Prototype:
number _chdir(string dirname)

Parameters:
dirname      [in] Path of new working directory

Description:
The _chdir function changes the current working directory to the directory specified by dirname. The dirname parameter must refer to an existing directory. This function can change the current working directory on any drive. If a new drive letter is specified in dirname, the default drive letter will be changed as well. For example, if A is the default drive letter and \BIN is the current working directory, the following call changes the current working directory for drive C and establishes C as the new default drive.

When you use the optional backslash character (\) in paths, you must place two backslashes (\\) in a C string literal to represent a single backslash (\).

Example:
// Only on Win32 Servers !!
_chdir("c:\\temp"); 
// or
_chdir("c:/temp"); // (recommended)


// on ANY server
_chdir("/temp");

Returns:
These functions return a value of 0 if successful. A return value of -1 indicates that the specified path could not be found.

Documented by Simona Plesuvu, generation time: Sun Jan 27 18:15:16 2013 GMT(c)2013 Devronium Applications