Function CurDir() Foundation
Determines or changes the current directory of a drive. The function is deprecated. Use the function CurDirectory() instead.
CurDir( [<cDrive>] ) --> cCurrentDirectory
or
CurDir( <cDirectory> ) --> cPreviousDirectory
The return value of CurDir() is a character string containing the current directory of the drive specified with <cDrive> without leading or trailing backslash characters (\). If an error occurs or the current path is the root directory, CurDir() returns a null string ("").
When a directory is specified for the function it changes the current directory accordingly and returns the previous directory. If the directory specified with <cDirectory> does not exist a runtime error is raised.
The environment function CurDir() determines the name of the current directory on a specific drive independent of the settings SET DEFAULT and SET PATH. Contrary to the DOS operating system, various Xbase++ applications can run under 32bit operating systems at the same time in different windows. When <cDrive> is not specified in this case, CurDir() returns the start directory of the Xbase++ program as the default value.
This function can also be used to change the current directory of a drive. To do this, a character string containing the desired path, including the drive designator, must be passed to the function. If the character string contains only one path, this path on the current drive becomes the current directory. To change to the root directory of a drive the drive letter followed by a colon and a backslash must be passed to CurDir() ( "D:\" ).
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.