int MakePathname (char directoryName[], char fileName[], char pathName[]);
Creates a pathname from a directory name or path and a filename. The subroutine ensures that a backslash separates the directory name or path and the filename.
char dirname[MAX_PATHNAME_LEN];
char pathname[MAX_PATHNAME_LEN];
GetProjectDir (dirname);
MakePathname (dirname, "FILE.DAT", pathname);
Input | ||
Name | Type | Description |
directoryName | string | The directory name or path to which to append the filename. |
fileName | string | Base filename and extension to append to the directory name or path. |
Output | ||
Name | Type | Description |
pathName | string | The buffer in which the resulting pathname is returned. The buffer must be at least MAX_PATHNAME_LEN bytes long. If the resulting pathname is greater than that size, an empty string is returned in this buffer. |
Name | Type | Description | ||||||||
result | integer | The result of the call.
|