If unable to set the current working directory (e.g., due to a non-existent path), the function returns an error; otherwise, the function returns null.
Parameters
path: string
desired working directory
Returns
Error | null
error object or null
Example
var err = chdir( __dirname );
if ( err ) {
throw err;
}
Changes the current working directory.
Notes
null
.