ODL bridged functions  clAlert

Chapter 2: Bridged Functions

chgCwd

Description

Changes the current working directory for an application, while setting the old working directory into a supplied parameter. This function can be used later to change the working directory back to its previous location.

Syntax

int chgCwd(string newPath, string *oldPath)

Parameter

Description

newPath

Directory of the new path.

oldPath

Pointer to the string that chgCwd places in the current working directory.

Return value

Integer.

Returns 1 for success, and 0 for failure.

Examples

Example 1

string new_path;
string old_path;
int rv;
new_path = "/home/impact/app1";
rv = chgCwd(new_path, &old_path);
if (rv == 0)
{
	erm("Error changing working directory to [%s]!!!",
         new_path);
}




Copyright © 2005. Sybase Inc. All rights reserved. clAlert

View this book as PDF