setCurDir
Top  Previous  Next

setCurDir ( string Path )

Use this function to change the current working directory for ImageWarp's file operations.

Parameters
 
Path  
 
A string specifying the directory to be set as the default one.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
The specified directory was not found.  

Remark
 
The specified path should comply with the standard notations for directory names in Windows operating system. When you use the optional backslash character (\) in paths, you must place two backslashes (\\) in a string to represent a single backslash (\). If the drive letter is omitted in Path, the current directory will be used as a reference. When you start ImageWarp, the current directory coincides with the ImageWarp working folder (typically "C:/Program Files/ImageWarp/").  
 
Examples
 
The following code uses the default ImageWarp directory as a reference to specify the new current directory:  
 
setCurDir("samples")  
loadIm(1,"sample14.iwd")  
 
The following code uses a full path to specify a new working directory: The backslash character is used:  
 
setCurDir("c:\\programs files\\imageWarp\\samples")  
loadIm(1,"sample8.iwd")  
 
The following statement changes the current working directory to a network folder:  
 
setCurDir("SERVER//DRIVE5:/images/tif/")