Chapter 8 Utility Library
© National Instruments Corporation 8-55 LabWindows/CVI Standard Libraries
Example
/* make a new directory named \DATA\WAVEFORM on drive C /*
/* assuming that C:\DATA does not exist */
MakeDir ("C:\\DATA");
MakeDir ("C:\\DATA\\WAVEFORM");
MakePathname
void MakePathname (char directoryName[], char fileName[], char pathName[]);
Purpose
Constructs a path name from a directory path and a filename. The subroutine ensures that the
directory path and the filename are separated by a backslash.
Parameters
Input directoryName string Directory path.
fileName string Base file name and extension.
Output pathName string Path name.
Return Value
None
Parameter Discussion
pathName must be at least MAX_PATHNAME_LEN bytes long. If the pathName constructed
from directoryName and fileName exceeds that size, an empty string is returned in pathName.
Example
char dirname[MAX_PATHNAME_LEN];
char pathname[MAX_PATHNAME_LEN];
GetProjectDir (dirname);
MakePathname (dirname, "FILE.DAT", pathname);