chdir(string) changes the current working directory of the process. If an error occurs, an exception is raised.